\(x^2-25+xy+5y\)
\(=\left(x^2-25\right)+\left(xy+5y\right)\)
\(=\left(x+5\right)\left(x-5\right)+y\left(x+y\right)\)
\(=\left(x+y\right)\left(x-5+y\right)\)
\(x^2-25+xy+5y\)
\(=\left(x-5\right)\left(x+5\right)+y\left(x+5\right)\)
\(=\left(x+5\right)\left(x-5+y\right)\)
\(=\left(x+5\right)\left(x+y-5\right)\)