When $Q(x) = x^TAx$ has a crossproduct in its form you can rewrite it to $y^tDy$.
to do this you use this:
Why is it needed to use orthonormal eigenvectors for $P$? I don't really understand this because normally when diagonalizing matrix A, I don't need to use an orthonormal form for $P$. So im wondering why I have to do this.

If the columns of $P$, namely $p_1,p_2,\dots,p_n$, form an orthonormal set, then, for all $i$ and $j$ $$(P^t P)_{ij} = p_i^t p_j = \langle p_j,p_i \rangle = \delta_{ij} = (I_n)_{ij}$$ In other words, if you form the matrix $P$ of only orthonormal eigenvectors we have that $$P^t = P^{-1}$$