If current is passed through solenoid $A$ as shown. Current entering at end $A$ is clockwise. When seen from the side of $A$, so it develops south polarity at $A$ and north polarity at $B$. When current $l$ through $A$ increase, it is like north of the magnet approaching the ring $B$ and due to Lenz's law face of ring $B$ facing $B$ develops north polarity and hence there is repulsion between the two.