Triples satisfy modulo primes condition
Number Theory · proposed by @vipproaccout
Let $T$ be the set of all triples $(x, y, p)$, where $x, y$ are positive integers and $p$ is a prime number, satisfying both of the following conditions:
• $5^{(p-1)^2} - 1$ is not divisible by $p^2$;
• $p^x + 5 = y^p$.
Find the value of
$$\sum_{(x,y,p)\in T} \big(xyp - x - y - p\big).$$