explain the logical error

Square both sides to get a2 = b2

a squared = a^2 = a * a

b * b can't be the same.