Hello

I've been having difficulty with understanding a concept within modular arithmetic

The question I have been stuck on for a while now is:

Given 5x = -2(mod 8)

find x^2(mod 8)

My attempt at a solution:

5x = -2(mod 8)'

25x^2 = 4 (mod 8)

x^2 = 4 (mod 8), as 25 = 4 (mod 8)

The answer at the back says 1, and I'm not sure where I went wrong

Thanks in advance