The identity for the difference of two squares is
a² - b² = (a + b)(a - b)
Note that by definition, i² = -1.
Then
a² - (bi)² = a² - i²b² = a² - (-1)b² = a² + b².
Also from the identity,
a² - (bi)² = (a + bi)(a - bi) = a² - abi + abi - i²b² = a² - (-1)*b² = a² + b²
Therefore
a² - (bi)² = a² + b²
This identity is true.