I think I have the energy today to fill in the details of this png image of a calculation
from this question: Finding $P$ such that $P^TAP$ is a diagonal matrix
$$ P^T H P = D $$
$$\left(
\begin{array}{rrr}
1 & 0 & 0 \\
- 4 & 1 & 1 \\
0 & - \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } \\
\end{array}
\right)
\left(
\begin{array}{rrr}
1 & 2 & 2 \\
2 & 4 & 8 \\
2 & 8 & 4 \\
\end{array}
\right)
\left(
\begin{array}{rrr}
1 & - 4 & 0 \\
0 & 1 & - \frac{ 1 }{ 2 } \\
0 & 1 & \frac{ 1 }{ 2 } \\
\end{array}
\right)
= \left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 8 & 0 \\
0 & 0 & - 2 \\
\end{array}
\right)
$$
$$ Q^T D Q = H $$
$$\left(
\begin{array}{rrr}
1 & 0 & 0 \\
2 & \frac{ 1 }{ 2 } & - 1 \\
2 & \frac{ 1 }{ 2 } & 1 \\
\end{array}
\right)
\left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 8 & 0 \\
0 & 0 & - 2 \\
\end{array}
\right)
\left(
\begin{array}{rrr}
1 & 2 & 2 \\
0 & \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } \\
0 & - 1 & 1 \\
\end{array}
\right)
= \left(
\begin{array}{rrr}
1 & 2 & 2 \\
2 & 4 & 8 \\
2 & 8 & 4 \\
\end{array}
\right)
$$
$$ H = \left(
\begin{array}{rrr}
1 & 2 & 2 \\
2 & 4 & 8 \\
2 & 8 & 4 \\
\end{array}
\right)
$$
$$ D_0 = H $$
$$ E_j^T D_{j-1} E_j = D_j $$
$$ P_{j-1} E_j = P_j $$
$$ E_j^{-1} Q_{j-1} = Q_j $$
$$ P_j Q_j = Q_j P_j = I $$
$$ P_j^T H P_j = D_j $$
$$ Q_j^T D_j Q_j = H $$
$$ H = \left(
\begin{array}{rrr}
1 & 2 & 2 \\
2 & 4 & 8 \\
2 & 8 & 4 \\
\end{array}
\right)
$$
$$ E_{1} = \left(
\begin{array}{rrr}
1 & - 2 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{array}
\right)
$$
$$ P_{1} = \left(
\begin{array}{rrr}
1 & - 2 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{array}
\right)
, \; \; \; Q_{1} = \left(
\begin{array}{rrr}
1 & 2 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{array}
\right)
, \; \; \; D_{1} = \left(
\begin{array}{rrr}
1 & 0 & 2 \\
0 & 0 & 4 \\
2 & 4 & 4 \\
\end{array}
\right)
$$
$$ E_{2} = \left(
\begin{array}{rrr}
1 & 0 & - 2 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{array}
\right)
$$
$$ P_{2} = \left(
\begin{array}{rrr}
1 & - 2 & - 2 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{array}
\right)
, \; \; \; Q_{2} = \left(
\begin{array}{rrr}
1 & 2 & 2 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\end{array}
\right)
, \; \; \; D_{2} = \left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 0 & 4 \\
0 & 4 & 0 \\
\end{array}
\right)
$$
$$ E_{3} = \left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 1 & 1 \\
\end{array}
\right)
$$
$$ P_{3} = \left(
\begin{array}{rrr}
1 & - 4 & - 2 \\
0 & 1 & 0 \\
0 & 1 & 1 \\
\end{array}
\right)
, \; \; \; Q_{3} = \left(
\begin{array}{rrr}
1 & 2 & 2 \\
0 & 1 & 0 \\
0 & - 1 & 1 \\
\end{array}
\right)
, \; \; \; D_{3} = \left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 8 & 4 \\
0 & 4 & 0 \\
\end{array}
\right)
$$
$$ E_{4} = \left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 1 & - \frac{ 1 }{ 2 } \\
0 & 0 & 1 \\
\end{array}
\right)
$$
$$ P_{4} = \left(
\begin{array}{rrr}
1 & - 4 & 0 \\
0 & 1 & - \frac{ 1 }{ 2 } \\
0 & 1 & \frac{ 1 }{ 2 } \\
\end{array}
\right)
, \; \; \; Q_{4} = \left(
\begin{array}{rrr}
1 & 2 & 2 \\
0 & \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } \\
0 & - 1 & 1 \\
\end{array}
\right)
, \; \; \; D_{4} = \left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 8 & 0 \\
0 & 0 & - 2 \\
\end{array}
\right)
$$
$$ P^T H P = D $$
$$\left(
\begin{array}{rrr}
1 & 0 & 0 \\
- 4 & 1 & 1 \\
0 & - \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } \\
\end{array}
\right)
\left(
\begin{array}{rrr}
1 & 2 & 2 \\
2 & 4 & 8 \\
2 & 8 & 4 \\
\end{array}
\right)
\left(
\begin{array}{rrr}
1 & - 4 & 0 \\
0 & 1 & - \frac{ 1 }{ 2 } \\
0 & 1 & \frac{ 1 }{ 2 } \\
\end{array}
\right)
= \left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 8 & 0 \\
0 & 0 & - 2 \\
\end{array}
\right)
$$
$$ Q^T D Q = H $$
$$\left(
\begin{array}{rrr}
1 & 0 & 0 \\
2 & \frac{ 1 }{ 2 } & - 1 \\
2 & \frac{ 1 }{ 2 } & 1 \\
\end{array}
\right)
\left(
\begin{array}{rrr}
1 & 0 & 0 \\
0 & 8 & 0 \\
0 & 0 & - 2 \\
\end{array}
\right)
\left(
\begin{array}{rrr}
1 & 2 & 2 \\
0 & \frac{ 1 }{ 2 } & \frac{ 1 }{ 2 } \\
0 & - 1 & 1 \\
\end{array}
\right)
= \left(
\begin{array}{rrr}
1 & 2 & 2 \\
2 & 4 & 8 \\
2 & 8 & 4 \\
\end{array}
\right)
$$
Best Answer
You need to find a new pair of variables, call them $u$ and $v$, each of which is a linear combination of $x$ and $y$, such that $A(u,v)$ does not contain cross terms (containing the product $uv$). If you write out $A$ as a quadratic form, $$ A(x,y) = \begin{bmatrix} x\\y\end{bmatrix}\begin{bmatrix}3 & -4\\-4 & 7 \end{bmatrix}\begin{bmatrix} x\\y\end{bmatrix}^T$$ If you diagonalize the matrix in the middle, the eigenvectors give you the linear combinations, and the eigenvalues are the new coefficients to $u^2$ and $v^2$.