The magnetic diffuse scattering of YBaCo4O7 and LuBaCo4O7 with alternating kagome and triangular lattices has been studied through neutron scattering measurements on single-crystal samples. In YBaCo4O7, the line-shape-magnetic-diffuse scattering is observed around the magnetic transition temperature, which is consistent with the Monte Carlo simulation. In LuBaCo4O7, the line-shape-magnetic-diffuse scattering has not been detected. At low temperature, the propagation vectors of the observed magnetic reflections are different between YBaCo4O7 and LuBaCo4O7. The structural distortion in RBaCo4O7 is suggested to play a critical role for the magnetic properties.