According to Lenz’s law, the induced current will oppose the change in magnetic flux. In figure (a), as the wire turns into a circular loop, the area of the loop increases, increasing the magnetic flux into the plane. To oppose this increase, the induced current wil be clockwise. In figure (b), the wire is turning into a straight line, decreasing the area and the magnetic flux out of the plane, so the induced current will be anticlockwise to oppose this change.