Prime numbers $p,q \in \Bbb P$ are such that $q\mid p^2+1$ and $p\mid q^2-1$. Prove that number $p+q+1$ is composite.
If $p+q+1$ is composite, then $p+q$ is also composite because it's even. Have no idea where to start to. Tried to sum, multiply these two fractions $\frac{p^2+1}{q},\frac{q^2-1}{p}$ but didn't get anything useful at all.
Since $p\mid (q-1)(q+1)$ we have $p\mid q-1$ or $p\mid q+1$.
a) If $p\mid q+1$ then $q+1 = kp$ where $k$ is positive integer so $p+q+1= (k+1)p$ is composite.
b) If $p\mid q-1$ then $p\leq q-1$ and $$pq\mid (q-1)(p^2+1) = p^2q-p^2+q-1\implies pq \mid p^2+1-q$$