12V DC to 5V DC with an output current of 2A
2 amps thru 22 ohms produces a volt drop of 44 volts so it won't work.

The output voltage will be about 4 volts under load ignoring the 22 ohm problem.

Ignoring the above, the power dissipation in the transistor will be about 15 watts at full load.

I'd use a buck converter because if you are looking for low cost then you need to take into account cost of ownership i.e. all those watts thrown away in heat won't be charged for by your electricity supply company with a buck converter. It may be pennies a day but it soon mounts up.