(a) The direction of current is along qrpq because the current induced in solenoid will oppose the approach of magnet, so from looking on magnet side, the current at nearer face should flow clockwise.
(b) In this case the current induced in coil pq will oppose the approach of magnet while coil xy will oppose the recession of magnet; so nearer faces of coils will act as S-poles. Accordingly the direction of current in coil pq will be along qrp and in coil xy it will be along yzx.