I received this from a student of mine who was really confused with the transition from line 2 to line 3. Students should give it a thought before reading my explanation below.
Firstly, my student felt that was being squared on both sides to remove the modulus and the next step should be . She is very mistaken, as is a complex number, which is a vector, and not a mere scalar. So the transition from step 2 to step 3 was really an evaluation of the modulus. If we do not skip any steps, the following should clarify how we got from step 2 to step 3.
I do hope this raise awareness for students to treat modulus carefully and question themselves, when they are dealing with a scalar or vector.