I need to algebraically prove minimum for $\frac{1}{2}x^TAx-x^Tb$ using $r = A^{-1}x-b.$
I can write $x$ as $A(r+b)$ and whole expression as $$ \begin{align} f(x) &=\frac{1}{2}(r+b)^TA^3(r+b) - (r+b)^TAb \\ &= \frac{1}{2}(Ar)^TA(Ar) - (Ar)^Tb \\ & + \frac{1}{2}(Ab)^TA(Ab) - (Ab)^Tb \\ & + (Ar)^TA^2b \\ \end{align} $$
And i don't know how to proceed.
This looks like a strange substitution. Try instead with $x=A^{-1} b + r$