Suppose I am given that a bilinear form $\phi(u,v)$ on $\mathbb{R}^3$ is represented by a diagonalisable matrix $M$ with respect to the pair of bases $\{u_i\}$ and $\{v_i\}$. If I wanted to find a pair of bases $\{\tilde{u_i}\}$ and $\{\tilde{v_i}\}$ with respect to which $\phi$ is represented by a diagonal matrix, would I simply need to diagonalise $M$ i.e. find $P$ such that:
$$\Delta =PMP^{-1}$$
and then see where $P$ sends $\{u_i\}$ and $\{v_i\}?$ This feels wrong but I am not sure how else to answer this.
Lets consider bases $\mathcal{B}_{1} = \{u_{i}\}$, $\mathcal{B}_{2} = \{v_{i}\}$, $\mathcal{B}_{1}^{\prime} = \{ u_{i}^{\prime}\}$, $\mathcal{B}_{2}^{\prime} = \{ v_{i}^{\prime}\}$. You have that $$\phi(w_{1},w_{2}) = [w_{1}]_{\mathcal{B}_{1}}^{T} M [w_{2}]_{\mathcal{B}_{2}}$$ and also that $$\phi(w_{1},w_{2}) = [w_{1}]_{\mathcal{B}_{1}^{\prime}}^{T} \Delta [w_{2}]_{\mathcal{B}_{2}^{\prime}}$$ for some diagonal matrix $\Delta$. You should use the change of bases matrices to get the correct formula from here.
If you can find $PMP^{-1} = \Delta$, then you can take $P = A_{1}^{T}$ and $P^{-1} = A_{2}$ and use that info to recover your bases (by interpreting them as the correct change-of-basis matrices, see the comment below).