So you have this expression:

And it is simplified to this:

The property used in this simplification comes from the definition of the imaginary number i. Let's recall that i is defined as:
![i=\sqrt[]{-1}](https://img.qammunity.org/2023/formulas/mathematics/college/prwnjpkamd054mvqxx3wkz9peqbswm21lz.png)
Then if we square both sides of this equation we get:
![\begin{gathered} i^2=(\sqrt[]{-1})^2 \\ i^2=-1 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/mwqvofbs8qcjnaqwd9nqoye7utgsb1ku3p.png)
And that is the reason behind the simplification performed.