In order to investigate magnetic phenomena in Nd and Sm layers separately, resonant x-ray magnetic scattering experiments have been performed to study Nd/Sm(001) superlattices with different relative layers thickness. The samples were grown using molecular beam epitaxy, and optimized to yield dhcp Sm growth and thus a coherent dhcp stacking across the Nd/Sm superlattices. The magnetic phases in Sm layers are very close to the ones evidenced in dhcp thick films. In contrast, the magnetism in Nd layers shows strong differences with the bulk case. In superlattices with a large Sm thickness (>8 nm), no magnetic scattering usually associated with Nd magnetic structure was detected. In superlattices with smaller Sm thickness (<4 nm), new Nd magnetic phases have been observed. A detailed analysis of the propagation of the magnetic structures in the cubic and hexagonal sublattices of both Sm and Nd is presented. Both Sm hexagonal and cubic magnetic phases propagate coherently through 3.7 nm thick Nd layers but remain confined in Sm layers when the Nd layers are 7.1 nm thick. In contrast, the critical Sm thickness allowing a coherent propagation of Nd magnetic order is different for the hexagonal and cubic sublattices above 5 K. Finally, we show that: (i) a spin-density wave and a 4f magnetic order with perpendicular polarization are exclusive on a given crystallographic site (either hexagonal or cubic); (ii) a 4f magnetic order on a crystallographic site does not perturb the establishment of a spin-density wave with a perpendicular polarization on the other site.