For complex matrices, if $\langle Ax,x\rangle=\langle Bx,x\rangle$ for all $x$, then $\langle Ax,y\rangle=\langle Bx,y\rangle$ for all $x$ and $y$?

Given $A$ and $B$, $n\times n$ complex matrices. If $\langle x,y\rangle =y^{*}x$ for all $x,y\in \mathbb C^{n}$, then the following are equivalent:

(1) $\langle Ax,y\rangle=\langle Bx,y\rangle$, for all $x,y\in \mathbb C^{n}$.

(2) $\langle Ax,x\rangle=\langle Bx,x\rangle$, for all $x,y\in \mathbb C^{n}$.

(1) implies (2) is easy, how to prove (2) implies (1)?

Solutions Collecting From Web of "For complex matrices, if $\langle Ax,x\rangle=\langle Bx,x\rangle$ for all $x$, then $\langle Ax,y\rangle=\langle Bx,y\rangle$ for all $x$ and $y$?"