I was wondering if anyone can help explain the following identity/equation to me
(z+i)^4 = 1 + i
The context for the problem is shown in the picture below, and is featured on a 2008 AMC math competition problem set.
A solution is offered however this equation is a crucial component in it. Any help would be much appreciated. Thanks!

Hint: by binomial expansion: $$\require{cancel}(z+i)^4 = z^4 + 4 i z^3 + 6 i^2z^2 + 4 i^3 z + i^4 = \cancel{(z^4 + 4 i z^3 - 6 z^2 - 4 i z \color{red}{-i})} + 1 + \color{red}{i} = 1+i$$