The correct option is B Lines of force emanate from side x
When switch SW1 is closed, solenoid will become a magnet, as we see that current is entering in the wire (solenoid) from side y.If we look at side y in front of its cross section , we will find that the direction of current in wire is clockwise.Clockwise means y side is the south (S) pole of solenoid that's why lines of force enters from this side and emanate from other side x.