$$a ( b - 5 ) b ( 5 - a )$$
$ab\left(5-a\right)\left(b-5\right)$
$5ab^{2}-25ab+5ba^{2}-\left(ab\right)^{2}$