Solution (source code)

= Solution

Reversing one winding reverses its signed coupling to the other, while its self-inductance is unchanged. With the same north-to-south current references,
$$
\boxed{M\longrightarrow-M,\qquad L_A,L_B\text{ unchanged}.}
$$
Equal currents then produce opposing magnetic fields: the signed axial field is proportional to $(n_1-n_2)I$, rather than $(n_1+n_2)I$. Which direction is positive must be fixed by the right-hand rule and the actual winding orientation.