Let $p,q\in\{1,2,\dots,n\}$ and $pq\ne1$. Then prove that $$\frac{p+q-2}{pq}\le 1-\frac{1}{n}.$$ Moreover equality holds iff $(p,q)=(1,n)$ or $(n,1).$
My attempt: $$\frac{p+q-2}{pq}=\frac{1}{p}(1-\frac{1}{q})+\frac{1}{q}(1-\frac{1}{p})$$ which is less than or equal to $\frac{1}{2}(1-\frac{1}{q})+\frac{1}{2}(1-\frac{1}{p}).$ Here if we choose $p$ or $q$ to be $1$ then $(1-\frac{1}{p})$ or $(1-\frac{1}{q})$ will be zero, so we take them to be $2$. And now to maximize further I choose $p$ and $q$ equal to $n$.
I am not sure about this bold line.
A possible approach is to fix $p$ and maximize the expression as a function of $q$:
If $p=1$ then $$ \frac{p+q-2}{pq} = 1 - \frac{1}{q} \le 1 - \frac 1n $$ with equality iff $q=n$. Otherwise $p \ge 2$ and $$ \frac{p+q-2}{pq} = \frac 1p \left( 1 + \frac{p-2}{q}\right) \le \frac 1p \left( 1+\frac{p-2}{1}\right) = 1 - \frac 1p \le 1 - \frac 1n $$ with equality iff