Ответ:

Так как \(a\equiv7\pmod{12}\), то

\(a^2-2a+5\equiv7^2-2\cdot7+5=49-14+5=40\pmod{12}\).

\(40=12\cdot3+4\).

Ответ: 4.