As before, we consider the equation
$$\frac{\sigma(x)}{x} = \frac{p+2}{p}$$
where $p$ is an odd prime.
We consider several cases. (Note that the list of cases presented here is not exhaustive.)
Case 1: $3 \mid x$
Since
$$\frac{\sigma(x)}{x} = \frac{p+2}{p}$$
implies that $x$ is an odd square, and since $3 \mid x$, it follows that $9 = 3^2 \mid x$, so that
$$\frac{13}{9} = \frac{1 + 3 + 9}{9} = \frac{\sigma(3^2)}{3^2} \leq \frac{\sigma(x)}{x} = \frac{p+2}{p}$$
from which we obtain
$$13p \leq 9(p + 2)$$
$$4p \leq 18$$
$$p \leq \frac{9}{2}.$$
Since $p$ is an odd prime, it follows that $p = 3$. (Since $p = 3$ also implies that $3 \mid x$, this means that we know that the biconditional
$$\bigg(3 \mid x\bigg) \Longleftrightarrow \bigg(p = 3\bigg)$$
must hold.)
Case 2: $5 \mid x$
Similar to the proof for Case 1, we get
$$\frac{31}{25} = \frac{1 + 5 + 25}{25} = \frac{\sigma(5^2)}{5^2} \leq \frac{\sigma(x)}{x} = \frac{p+2}{p}$$
from which we have
$$31p \leq 25(p + 2)$$
$$6p \leq 50$$
$$p \leq \frac{25}{3}.$$
Since $p$ is an odd prime, it follows that either $p = 3$, $p = 5$, or $p = 7$.
Case 3: $p \mid x$
Note that this case holds in general (since $\gcd(p, p+2)=1$ follows from $p$ is an odd prime).
As in Case 1, it follows that
$$\frac{1 + p + p^2}{p^2} = \frac{\sigma(p^2)}{p^2} \leq \frac{\sigma(x)}{x} = \frac{p+2}{p}$$
from which we obtain
$$\frac{1}{p^2} + \frac{1 + p}{p} \leq \frac{2 + p}{p}.$$
This last inequality implies that
$$\frac{1}{p^2} \leq \frac{1}{p}$$
from which we get
$$p \leq p^2$$
whence there is no contradiction.