Can you help me solve this problem: Express the following symmetric rational function
$$\frac{x_1}{-6x_2^2 - 7x_3x_2 - 6x_3^2} + \frac{x_3}{-6x_1^2 - 7x_2x_1 - 6x_2^2} + \frac{x_2}{-6x_1-7x_3x_1-6x_3^2}$$
as a function of $p$ and $q$, where $x_1$, $x_2$ and $x_3$ are the roots of: $x^3 + px + q$?
Instead of doing the calculations outright I can give you the procedure. The key facts are Vieta's formulas and the fundamental theorem of elementary symmetric polynomials.
Definition. In $n$ variables the $k$th elementary symmetric polynomial is given by
$$e_k(x_1,\cdots,x_n) ~=~ \sum_{i_1<\cdots<i_k}x_{i_1}\cdots x_{i_k} ~=~ \sum_{\substack{T\subseteq\{1,\cdots,n\} \\ |T|=k}}\prod_{t\in T}x_t,$$
for $0\le k\le n$, where $e_0(x_1,\cdots,x_n):=1$ is defined by the empty product and $\varnothing\subseteq\{1,\cdots,n\}$.
Vieta's formulas. The expansion of the polynomial in $z$ with roots $x_1,\cdots,x_n$ is given by
$$\prod_{i=1}^n (z-x_i)=\sum_{k=0}^n (-1)^{n-k}e_{n-k}(x_1,\cdots,x_n) z^k.$$
In your case, this means if $x_1,x_2,x_3$ are the roots of $z^3+pz+q$, then
$$\begin{cases} e_1(x_1,x_2,x_3)=x_1+x_2+x_3 = 0 \\ e_2(x_1,x_2,x_3)=x_1x_2+x_2x_3+x_3x_1=p \\ e_3(x_1,x_2,x_3)=x_1x_2x_3=-q.\end{cases} \tag{*}$$
Fundamental theorem of symmetric polynomials. Any symmetric polynomial in $n$ variables is expressible as a polynomial in the elementary symmetric polynomials in $n$ variables. Expressed algebraically, $\Bbb Z[x_1,\cdots,x_n]^{S_n}=\Bbb Z[e_1,\cdots,e_n]$ (where $-^{S_n}$ means the subset of $S_n$-invariants).
I mention a proof in this post which carries a recursive algorithm for actually determining the $p$ for which $f(x_1,\cdots,x_n)=p(e_1,\cdots,e_n)$ given a symmetric polynomial $f$:
Write your rational function as $P(x_1,x_2,x_3)/Q(x_1,x_2,x_3)$. It suffices to be able to express both $P$ and $Q$ in terms of $e_1,e_2,e_3$ given $(*)$. See if you can do that following the above procedure. If you get stuck you can comment and I'll do some calculations to help out.