Can a number equal two different values at once?

In algebra, I came across a strange situation where it seems like: a=t , 2=1

How is this even possible? Where does the mistake happen in such proofs?

Please explain clearly which step is wrong and why it is not allowed in algebra.