Julia had to find the imaginary part of the complex number $(5+2\mathrm{i})(1-\mathrm{i})-\mathrm{i}(2+\mathrm{i})$.
In which step of her solution did Julia make a mistake?
(The step number is above the equality sign.)
$$ \begin{aligned} (5+2\mathrm{i})(1-\mathrm{i})-\mathrm{i}(2+\mathrm{i}) &\stackrel{(1)}= 5-5\mathrm{i}+2\mathrm{i}-2\mathrm{i}^2-2\mathrm{i}-\mathrm{i}^2= \cr &\stackrel{(2)}= 5-5\mathrm{i}-3\mathrm{i}^2=\cr &\stackrel{(3)}= 5-5\mathrm{i}-3=\cr&\stackrel{(4)}= 2-5\mathrm{i}\stackrel{(5)}\implies \end{aligned} $$
Imaginary part of this complex number is $-5$.
In step (1). By expanding all parentheses, we get the expression $5-5\mathrm{i}+2\mathrm{i}-2\mathrm{i}^2-2\mathrm{i}+\mathrm{i}^2$.
In step (2). By collecting like terms, the expression simplifies to $5-2\mathrm{i}$.
In step (3). The expression simplifies to $5-5\mathrm{i}+3$.
In step (5). The imaginary part of the complex number $2-5\mathrm{i}$ is $-5\mathrm{i}$.
The complex number $z = [a,b]$ can be written in algebraic form as $z = a + b\,\mathrm{i}$, where $\mathrm{i}$ is an imaginary unit for which $\mathrm{i}^2=-1$ holds. The number $a$ is called the real part of the complex number $z$, the number $b$ is called the imaginary part of the complex number $z$.
The mistake is in step (3). It should be $-3\,\mathrm{i}^2=3$, and so after correction, we get the complex number $8-5\,\mathrm{i}$. The imaginary part of this complex number is $-5$. Julie, therefore, got the correct result but by an incorrect procedure.