Find all triples $(p, q, r)$ of prime numbers such that all of the following numbers are integers

$$
\frac{p^{2}+2 q}{q+r}, \quad \frac{q^{2}+9 r}{r+p}, \quad \frac{r^{2}+3 p}{p+q}
$$
We consider the following cases:

1st Case: If $r=2$, then $\frac{r^{2}+3 p}{p+q}=\frac{4+3 p}{p+q}$. If $p$ is odd, then $4+3 p$ is odd and therefore $p+q$ must be odd. From here, $q=2$ and $\frac{r^{2}+3 p}{p+q}=\frac{4+3 p}{p+2}=3-\frac{2}{p+2}$ which is not an integer. Thus $p=2$ and $\frac{r^{2}+3 p}{p+q}=\frac{10}{q+2}$ which gives $q=3$. But then $\frac{q^{2}+9 r}{r+p}=\frac{27}{4}$ which is not an integer. Therefore $r$ is an odd prime.

2nd Case: If $q=2$, then $\frac{q^{2}+9 r}{r+p}=\frac{4+9 r}{r+p}$. Since $r$ is odd, then $4+9 r$ is odd and therefore $r+p$ must be odd. From here $p=2$, but then $\frac{r^{2}+3 p}{p+q}=\frac{r^{2}+6}{4}$ which is not an integer. Therefore $q$ is an odd prime.

Since $q$ and $r$ are odd primes, then $q+r$ is even. From the number $\frac{p^{2}+2 q}{q+r}$ we get that $p=2$. Since $\frac{p^{2}+2 q}{q+r}=\frac{4+2 q}{q+r}<2$, then $4+2 q=q+r$ or $r=q+4$. Since

$$
\frac{r^{2}+3 p}{p+q}=\frac{(q+4)^{2}+6}{2+q}=q+6+\frac{10}{2+q}
$$

is an integer, then $q=3$ and $r=7$. It is easy to check that this triple works. So the only answer is $(p, q, r)=(2,3,7)$.