If $r_1, r_2, r_8$ are the roots of the equation $x^2+p x^2+q x+r=0$, find the values of the following expressions in terms of the coefficients without solving the equation:
$\left(r_1^2+r_2^9+r_8^2\right)+2\left(r_1 r_2+r_2 r_3+r_3 r_1\right)+3 r_1 r_2 r_8$.