Why are these algebraic expressions used and explain the logical error: Since a = b, then a2 = a * b

Subtract b2 from both sides a2 – b2 = a * b – b2
Factor both sides: ( a + b )( a – b ) = b(a – b )
Divide both sides by ( a – b)
( a + b ) = b
Since a = b,

error:

since a-b = 0, you are dividing by zero !!!!