If I is passed as shown, the solenoid becomes a magnet, with its magnetic moment pointing towards B .When I increases, it is like north of the magnet approaching B. B develops magnetic moment so as to oppose the change due to Lenz's Law.Hence B is repelled.