Theorem: Let $V$ be finite-dimensional inner-product space and $A\in L(V) $. There exist unique operator $A^*$ such that $\langle Ax,y \rangle=\langle x,A^*y \rangle$ for every $x,y\in V$.
Proof: Lets fix $y\in V$ and observe mapping $f_{A,y}(x)=\langle Ax,y \rangle$. We obviously got linear functional on $V$ and by Riesz reprenstation theorem there exist unique vector-whom we will call $A^*y$- such that $f_{A,y}(x)=\langle x,A^*y \rangle$ for every $x\in V$. In other words we have $$\langle Ax,y \rangle = \langle x,A^*y \rangle$$ for every $x\in V$. If we repeat this algorithm for every $y\in V$ we get $$\langle Ax,y \rangle = \langle x,A^*y \rangle$$ for every $x,y\in V$.
The part that I don't understand is if we defined $f_{A,y}(x)=\langle Ax,y \rangle$ how can we lose $Ax$ when we apply Riesz theorem and get $f_{A,y}(x)=\langle x,A^*y \rangle$. I understand Riesz theorem if we have regular linear functionals, but if we defined functional with $Ax$ inside of it how do we lose it.
Maybe a re-wording of the proof will help you.
Fix $y \in V$ and look at $f_{A,y}(x)=\langle Ax,y \rangle$. By the Riesz representation, we have $f_{A,y}(x)=\langle x,z\rangle$ for some $z \in V$ that depends on $A$ and $y$. Therefore, we can look at it as $f_{A,y}(x)=\langle x, g_A(y) \rangle$ since $g_A(y)$ depends on both $A$ and $y$. Thus, we have: $$\langle Ax,y \rangle=f_{A,y}(x)=\langle x,g_A(y)\rangle$$ Thus, $g_A$ is the adjoint operator we were looking for, so we write $g_A=A^*$, prove the linearity of $g_A$, and we are done.