let that something be \(y\)
so,
\(y*(x-5)=x^2-25\)
Notice that the right-hand side (after the equal)
can be factorized into
\((x-5)(x+5)\) since it is a difference between two squares.
So now we have
\(y*(x-5)=(x-5)(x+5)\) Divide both sides by \((x-5)\)
\(y=(x+5)\)
that "something" is \((x+5)\)