Math can do a lot of things, including "proving" logical impossibilities. For example:
Let a = b.
Then a^2 = a*b.
Then 2a^2 = a^2 + a*b.
Then 2a^2 - 2ab = a^2 + ab - 2ab.
Consequently 2a^2 - 2ab = a^2 - ab.
Factoring, 2(a^2 - ab) = 1(a^2 - ab).
Divide by (a^2 - ab), and...
2 = 1
(There is (sort of) an error in the above, but most people miss it. See if you can guess it!)
There is an error, and most people do miss it.
What you wrote was 2 * 0 = 1 * 0 and that does not prove 2 = 1.