\(a,=\left(a-5\right)^2-4b^2=\left(a-2b-5\right)\left(a+2b-5\right)\\ b,=ax^2+a-a^2x-x=ax\left(a-x\right)+\left(a-x\right)=\left(ax+1\right)\left(a-x\right)\)
a: \(=\left(a-5-2b\right)\left(a-5+2b\right)\)
b: \(ax^2+a-a^2x-x\)
\(=ax\left(x-a\right)-\left(x-a\right)\)
\(=\left(x-a\right)\left(ax-1\right)\)