Given $x \in \mathbb R$ such that $8x^3 - 4x^2 - 4x + 1 = 0$. Find all rationals $p, q, r$ such that $px + q(2x^2 - 1) + r(4x^3 - 3x) = -4$. 
Given $x \in \mathbb R$ such that $8x^3 - 4x^2 - 4x + 1 = 0$. Find all rationals $p, q, r$ such that $$\large px + q(2x^2 - 1) + r(4x^3 - 3x) = -4$$

We have that $$8x^3 - 4x^2 - 4x + 1 = 0 \iff (-1) + 2x - 2 \cdot (2x^2 - 1) + 2 \cdot (4x^3 - 3x) = 0$$ and $$px + q(2x^2 - 1) + r(4x^3 - 3x) = -4 \iff (-4) \cdot (-1) + px + q(2x^2 - 1) + r(4x^3 - 3x) = 0$$
This implies that $(p + 8)x + (q - 8)(2x^2 - 1) + (r + 8)(4x^3 - 3x) = 0$.
One solution is that $p + 8 = q - 8 = r + 8 = 0 \implies (p, q, r) = (-8, 8, -8)$
I suspect to there be other solutions of $(p, q, r)$, for example, $$x = \frac{1}{6} \cdot \left[1 - \sqrt[3]{\frac{7}{2}(3\sqrt3i + 1)} + \sqrt[3]{\frac{7}{2}(3\sqrt3i - 1)}\right]$$, according to WolframAlpha, is a solution to the equation $8x^3 - 4x^2 - 4x + 1 = 0$.
Right... So WolframAlpha is untrustworthy, according to Michael Rozenberg, the solutions to $8x^3 - 4x^2 - 4x + 1 = 0$ are $\cos\dfrac{\pi}{7}, \cos\dfrac{3\pi}{7}, \cos\dfrac{5\pi}{7}$, which is correct when plugged into the original equation.

Define $g(x) = 8x^3 - 4x^2 - 4x + 1$ and 
$$\begin{align}h(x) &=  px + q(2x^2 - 1) + r(4x^3 - 3x) +4\\
 &= 4rx^3 + 2qx^2 + (p-3r)x + (4-q).\end{align}$$
In other terms, your question is: for what $p,q,r$ does $h(\alpha) = 0$, for every $\alpha: g(\alpha)=0$? 
Well, $\mathbb C$ is algebraically closed, so $g(x)$ has $3$ (not necessarily distinct) roots; let $\alpha$ be one of them. Let's take a look at its derivative: $g'(x)= 24x^2-8x - 4$. If $\alpha$ has multiplicity greater than $1$, then we know that $g'(\alpha) = 0$. By polynomial long division, we have that $g(x) = d(x)g'(x) + (-\frac{28}{9}x+\frac79)$. So, if $\alpha$ has  multiplicity greater than $1$, 
$$\overbrace{g(\alpha)}^0 = d(\alpha)\underbrace{g'(\alpha)}_0 + \frac19(-28\alpha + 7) = \frac19(-28\alpha+ 7).$$
So $\alpha = \frac{7}{28} = \frac14$. But $g(\frac14) = -\frac{1}{8}$, so no root has multiplicity greater than one. Thus we have $3$ distinct roots $\alpha_1, \alpha_2$ and $\alpha_3$ to both $g$ and $h$. To prove that your result is the only possible, we'll use a trick to have a polynomial identity: define 
$$\begin{align}
l(x) &= rg(x) - 2h(x)\\
&= (-4r-4q)x^2 + (2r-2p)x + (r-8+2q).\\
\end{align}$$ 
Note that $\operatorname{deg}l\leq 2$. Also, $\alpha_1, \alpha_2$ and $\alpha_3$ are roots. But the number of roots certainly exceeds the degree of this polynomial, so it must be identical to $0$, i.e., all coefficients are $0$. Finally,
$$
\begin{cases}
-4r -4q &= 0\\
2r  -2p &= 0\\
r+2q-8 &= 0
\end{cases} \,\,\therefore \boxed{(p,q,r) = (-8,8,-8).}$$
You can check this linear system here, and it guarantees uniqueness.
