How to rearrange this matrix equation to find x The equation is:
$$ A=x^{T}Bx $$
How to get matrix $x$ knowing $A$ and $B$? Should I somehow divide both sides by $B^{-1}?$ 

A and B as well as x are square matrices. A and B are symetric with positive diagonal values.
This doesn't have a unique solution. For example if $A=B=I$ then we just need
$$x^Tx=I$$
so $x$ can be any orthogonal matrix.
Since we know $A$ and $B$, one straightforward way is to just matrix multiply using $x$ as a matrix of variables, then use linear algebra to solve the equation.

Depending on whether some matrices are diagonal or orthonormal, we can do some additional tricks or even perform numerical computations, but without knowing the kind of the matrices, it's hard to say which way to go.

Note that matrix multiplication is not commutative, so you can't simply multiply $B^{-1}$ to eliminate $B$ in the middle.