The boat is initially sailing due North as indicated by a compass and the Earth's magnetic field is 2.0*10^-5 T. A radio is placed above the compass. There is a current carrying wire in the radio that is aligned in the North-South direction, carries a current of 5 A and is placed 30 cm above the compass needle.
There is a magnetic field created due the current flowing in the wire and at a distance r from the wire is equal to B = C*I/(2*pi*r) where I is the current flowing and C is a constant equal to 4*pi*10^-7 T*m*s/C. Substituting the values given B = (4*pi*10^-7*5)/(2*pi*0.3) = (10^-6)/(0.3)
The net force of the magnetic field of the Earth and the that of the current carrying wire acts in a direction making a angle theta = arc tan((10^-6/(0.6*10^-5))
=> arc tan(1/6)
=> 9.46 degrees