The magnetic dipole moment should be ##\vec{m} = N_1 I \vec{A}## with ##\vec{A}## being a vector normal to the surface bound by the current loop.
The potential energy is given by ##U = -\vec{m} \cdot \vec{B}## but since m and B point in the same direction it should just be ##U = -mB##.
The...
I have attempted to solve it as follows:
Using the Biot-Savart law, I found the flux density at the centre of the smaller coil due to the bigger coil as:
$$\frac{\mu_0 I b^2 N_2}{2(a^2 + b^2)^{1.5}}$$
where a is the distance to the coil (10cm), N2 is the number of loops in the larger coil (50)...