\[(y - 5)^{2} - (y - 2) \cdot 5y =\]
\[= y^{2} - 2 \cdot y \cdot 5 + 5^{2} - \left( 5y^{2} - 10y \right) =\]
\[= y^{2} - 10y + 25 - 5y^{2} + 10y =\]
\[= - 4y^{2} + 25.\]