Lily's error is in the first step, (2+i)^2 ≠ 4 + i^2.
(2+i)^2 = (2+i)(2+i) and you need to FOIL.
(2+i)^2 = (2+i)(2+i)
= 4 + 2i + 2i + i^2
= 4 + 4i + (-1)
= 3 + 4i
Bonus:
If you want to multipy (2+i) by (a+bi) and not end up with a complex number, you'd first FOIL
(2+i)(a+bi) = 2a + 2bi + ai + bi^2
We know i^2 = -1, so this becomes
= 2a + 2bi + ai + b(-1)
= 2a + 2bi + ai - b
= 2a - b + 2bi + ai
Now, for this not to be complex, we need the imaginary pieces to cancel each other out. In other words 2bi+ai=0. For that to happen, 2b + a = 0, or
2b = -a or a = -2b
So it would seem that if we pick any b-value and make a = -2b, then we'll end up with a non-complex number.
Let's try b=5, making a = -10
(2+i)(-10+5i) = -20 + 10i - 10i + 5i^2
The 10i's cancel and 5i^2 = -5, so we're left just with -25.