Find the value of $a^4-a^3+a^2+2$ when $a^2+2=2a$ Find the value of $a^4-a^3+a^2+2$ when $a^2+2=2a$
My Attempt, 
$$a^4-a^3+a^2+2=a^4-a^3+2a$$
$$=a(a^3-a^2+2)$$
What's next?

Hint $\ $ We seek the value of $\,f(a)\,$ given that $\, g(a) = a^2-2a+2 = 0.\,$ By the Polynomial Division Algorithm we can write  $\ f = q\,g + r\,$ so $\, g=0\,\Rightarrow\, f = r = f\bmod g.\,$ So it suffices to compute the remainder $\, r = (f\bmod g).\,$ Doing so easily yields $\,f = r = 0.$
Because $\, g = 0\,$ we can perform all arithmetic modulo $g.\,$ This is the point of modular arithmetic - when we are interested only in the remainder then we can ignore the quotients. This is exactly what is done (implicitly) in Stefan4024's answer. 
