Transistor is very small device and used when small increase in voltage or current is required like in micro amperes. Transformer is used when we deal with voltages and currents.
The main difference between a transformer and an amplifier is that a transformer does not change the energy of the AC signal (ideal). So no energy sain.
In an amplifier, external source spends energy to increase the amplitude of the AC signal. So output signal has more enrgy than input in amplifier while O/P and I/P power are same in transformer.
"If you win, you shall not have to explain and if you lose, you wont be there to explain"
~ Adolph Hitler