Prove for all integer $n > 1$ that if $n | 34$, then $n+5$ and $n^2+$9 are coprime
The easy way is following. Since $n\in\{1,2,17,34\}$ check the statement for each $n$:
$$n=1: \gcd(6,10)=2$$
$$n=2: \gcd(7,13)=1$$
$$n=17: \gcd(22,298)=2$$
$$n=34: \gcd(39,1165)=1$$
So the statement is true only for even $n$.
"Hard way": Say exists prime $p\mid n+5$ and $p\mid n^2+9$, then $p\mid n^2-25$ so $$p\mid (n^2+9)-(n^2-25) = 34$$
This means $p= 2$ or $p=17$.
If $p=17$ we get $n+5\geq 17$ so $n=17$ or $n=34$ and thus $p\mid n$ so $p\mid 5$ which is not true.
Case $p=2$ is possible iff $n$ is odd.
[Note: this answer presumes that the question intended $\,34\mid n,$ not $\,n\mid 34$ as written.]
Hint:
If $d$ divides both $n+5, n^2+9$
$d$ must divide $n^2+9-(n+5)(n-5)=34$
So, $(n+5,n^2-9)$ must divide $34$
But $34\mid n\implies(n+5,34)=1$