The roots of $\phi$ are the values $u$ such that $f^3(u)=u$ and $f(u)\neq u$.
If $u$ is a root of $\phi$, then $f(u)$ and $f^2(u)$ are also different roots of $\phi$, since:
$f^3(f(u))=f^4(u)=f(u)$ $f^3(f^2(u)) = f^5(u)=f^2(u)$
Applying the chain rule to both sides of $f^3\circ f = f\circ f^3$, we see that:
(f^3)'(f(z))f'(z) = f'(f^3(z))(f^3)'(z)
So if $f^3(z)=z$, then:
(f^3)'(f(z)) = (f^3)'(z)
So, in particular, if $u$ is a root of $\phi$ then (f^3)'(u)=(f^3)'(f(u))=(f^3)'(f^2(u)))
So given two roots in $\{u,f(u),f(f(u))\}$ your expression is not only rational, but zero.
So, now you can partition of the sets of roots of $\phi$ into two disjoint sets $\{u,f(u),f^2(u)\}$ and $\{v,f(v),f^2(v)\}$.
If g(z)=(f^3)'(z), then we know that $g(u)=g(f(u))=g(f^2(u))$ and $g(v)=g(f(v))=g(f^2(v))$.
The final step is to look at the expression $\sum_{w_1,w_2} {(g(w_1)-g(w_2))^2}$ where $w_1$ and $w_2$ are taken over all roots of $\phi$. By the above-noted property, this expression is equal to $18(g(u)-g(v))^2$.
But since this expression is symmetric in the roots of $\phi$, and $\phi$ has rational coefficients, this expression is necessarily rational. Therefore, $(g(u)-g(v))^2$ is rational, which is what we needed to prove.
[There are a few more steps you need to fill in here - specifically, that the $\phi$ does not have $f(z)-z$ as a factor, or, alternatively, that $f^3(z)-z$ has no repeated roots. You can prove that by brute force, but I wonder if you can come up with a more general proof for (most?) quadratic $f$.]