(a) The polarity of end X is south because the current is flowing in a clockwise direction at this end.
(b) The polarity of end Y is north because the current is flowing in an anticlockwise direction at this end.
(c) We have used the clock face rule to determine the polarities.
Extra information with the image is posted for reference only
A current-carrying circular wire (coil) behaves like a thin disc magnet with one face being the north pole and the other faces the south pole.
If the direction of current in the front face of a circular wire isclockwise, then the direction of current in the back face of this circular wire will be anticlockwise, and
If the direction of current in the front face of a circular wire is anticlockwise, then the direction of current in the back face of this circular wire will be clockwise.
According to the clock face rule, if we look at one face of the circular wire (or coil) through which a current is passing, we have the following conclusions:
1. If the observer finds the current to be flowing in the anti-clockwise direction, then the face of the circular wire (or coil) will behave like the North Pole.
2. If the observer finds the current to be flowing in the clockwise direction, then the face of the circular wire (or coil) will behave like the South Pole.