Here we have electromagnetic induction. Variable currents induce magnetic fields in loops, according to the Right Hand-Hand Grip Rule. Since the current given by the power supply is going from C to D, the magnetic field generated by the left circuit goes from the D to C direction. This is, looking from the coil of the C end, the magnetic field inside the solenoid is coming to you. The vector is DC orientated, meaning the N pole is in C. Now, when this generated magnetic field is studied in our right loop/circuit, its magnetic field lines are going from A to B, because magnetic lines are closed and go back to the initial point. This is, looking from the A coil-coil you see an entering vector arrow. So, as you said, this magnetic field is perturbing the AB solenoid and due to the Conservation of Energy, the second solenoid is preparing another magnetic field, called induced magnetic field, to counter the effects of the first magnetic field. So, how do you think this solenoid is going to do this? Well, through the flow of a second current which is the induced current. This current does not have another alternative than going from A to B, since it is the only way it can create a magnetic field to oppose the change in this second solenoid. So, looking from the coil of the AC end the induced current (i) in the second solenoid is COUNTER CLOCKWISECOUNTERCLOCKWISE. The main mistake in these cases is related to the position of the hand. The thumb indicates the direction of the magnetic field when the other fingers adjust to the current direction, but it depends if the loop of the solenoid is made clockwise or counter clockwisecounterclockwise, so be careful.
Here you have your case, the current going from the North Pole to the South Pole:
More info: http://www.geocities.ws/motorac2002/electromagnet.htm https://theengineeringmindset.com/how-solenoids-work/right-hand-grip-rule-solenoid-coil/