How was the transformer reduced in this Thevenin equivalent circuit?
The transformer is presumed to be ideal with a magnetization inductance of L1 hence, when Vi is set to zero, the impedance on that side of the ideal transformer is R1||sL1.

That impedance is transformed by the turns ratio squared (\$a^2\$) to the secondary output side hence it becomes: -

$$a^2(R_1 || sL_1)$$

Given that it is in series with R2 it should now be clear.