Why is $(A^\top A \mathbf{x}, \mathbf{x}) = (A \mathbf{x}, A \mathbf{x})$? Let $(\mathbf{x}, \mathbf{y})$ denote the inner product between $\mathbf{x}$ and $\mathbf{y}$, and let $A$ be a real matrix.  Why is $(A^\top A \mathbf{x}, \mathbf{x}) = (A \mathbf{x}, A \mathbf{x})$?

Using the scalar product it's easy to see that
$$
\begin{align}
(A^\top A \mathbf{x})^\top \mathbf{x} &amp;= \mathbf{x}^\top A^\top A \mathbf{x} \\
&amp;= (A \mathbf{x})^\top A \mathbf{x} 
\end{align}
$$
but using only the properties of the inner product I fail to see how one gets the result.

Edit:

To be clear, I'm asking how one comes to the conclusion that $(A^\top A \mathbf{x}, \mathbf{x}) = (A \mathbf{x}, A \mathbf{x})$, independently of how the inner product is defined (ie. only using the axioms of the inner product), so if your answer relies on a particular definition of the inner product such as $(\mathbf{x}, \mathbf{y}) := \mathbf{x}^\top\mathbf{y}$, it's not good.

Edit 2:

The equality I'm asking about can be found in the book Linear Algebra Done Wrong (pdf) by Sergei Treil (p. 172), although here I'm interested only in the case of real matrices in the book it covers the complex case as well.
Well, I don't think what you're asking can be proven, because I don't think it's true for all inner products on $\mathbf{R}^n$. Therefore, you have to specifically use the defined inner product.

We have that $\langle x,y\rangle$ is an inner product on $\mathbf R^n$ if and only if
$$\langle x,y\rangle = x^\intercal My$$
for a symmetric, positive definite matrix $M$, see here. Hence, we have that
$$\langle A^\intercal A x,x\rangle = (A^\intercal A x)^\intercal M x = x^\intercal A^\intercal A Mx = (Ax)^\intercal A Mx $$
whereas
$$\langle Ax, Ax\rangle = (Ax)^\intercal M Ax.$$

So they are only equal in general if $M$ and $A$ commute, which happens e.g. when $M = I_n$ is the idendity matrix which gives the standard inner product on $\mathbf R^n$.
In your work, we have $(Ax)^T Ax$. The inner product is $(x, y) = x^T y$. Now set $x=Ax, y=Ax$, and it becomes clear. You transpose the first argument and multiply by the second.