Solution:
Concept: Clock rule: Look at one face (end) of a current loop or solenoid. If the current at that face flows anticlockwise, the face behaves as a north pole; if it flows clockwise, the face behaves as a south pole. Field lines inside a magnet run from its S end to its N end.
(i) Polarity at A and B
Step 1 — Find the direction of the current.
The long plate (+) of the cell is on the left. When the switch is pressed, the current leaves the + terminal, flows left through the switch, up the left-hand wire and enters the coil at the bottom of the arm ending in A. It winds up this arm, crosses over at the top and winds down the other arm, leaving at the bottom of the arm ending in B.
Step 2 — Look at the end A.
On the front of the left arm every turn carries the current from left to right. Seen from below, looking up at the end A, this current goes round clockwise, so A is a south pole.
Step 3 — Look at the end B.
On the front of the right arm the wire runs downwards, and its front strokes again carry the current from left to right. Seen from below, the current at B is also clockwise, so B is also a south pole.

Both arms are magnetised with the field pointing up inside them, so the bend of the U becomes a north pole.
(ii) Strengthening the electromagnet
Step 4 — Increase the current.
The field of an electromagnet grows with the current, so it can be made stronger by increasing the current, using more cells or less resistance. Increasing the number of turns also works.
(iii) Current reversed
Step 5 — Reverse every pole.
Reversing the current reverses the direction of the current in every turn, so every pole is reversed: A and B both become north poles (and the bend becomes a south pole).
Watch out: Follow the wire on each arm separately; the side the wire runs DOWN does not by itself reverse the pole, the sense in which the current goes ROUND the arm does.
Note: Some answer keys give A as north and B as south. That needs the two arms wound in opposite senses (the usual horse-shoe electromagnet), which is not what this figure shows; for the winding as printed, both free ends have the same polarity.
Therefore, (i) as drawn, A is a south pole and B is a south pole; (ii) the field is made stronger by increasing the current (or the number of turns); (iii) on reversing the current, A and B both become north poles.