What I have tried so far: $n$ certainly can't be prime. It also can't be a power of prime as $\varphi(p^k)=p^k-p^{k-1})$ unless it is $25=5^2$. From here on, I am pretty stuck. I tried considering the prime factorization of $n$, or perhaps looking for some contradiction, which would show $n$ must be a power of a single prime, but cannot make progress: Let $n=p_1^{e_1}...p_k^{e_k}$. Then $$n(1-\frac 1{p_1})...(1-\frac 1{p_k})=p_1^{e_1}...p_k^{e_k}-5.$$ Do I need to consider modulo 5? I also thought about considering whether or not $5\mid n$ or whether $n$ is even/odd, but cannot seem to make progress.
I found this similar question asked on StackExchange a while ago, but since the RHS is $n-2$, they could consider restrictions with parity. I also don't get why they could assume that $n=pq$ is a product of exactly 2 distinct primes only for the contradiction.