Which set-up has the stronger magnetic field?

Answer:
set-up X
Explanation:
Assuming that both nails are iron and the charge of the battery is the same, set-up X has a stronger magnetic field.
The more coils [turns] made around a nail, the stronger the electromagnet / magnetic field will be because each coil/loop essentially sets up its own magnetic field.
Hope this helps!!