\(=\left[5a-\left(b-1\right)\right]\left(a+b-1\right)-24\left(a+1\right)^2+b^2-1\)
\(=5a^2+5a\left(b-1\right)-a\left(b-1\right)-\left(b-1\right)^2-24\left(a+1\right)^2+b^2-1\)
\(=5a^2+4a\left(b-1\right)-\left(b-1\right)^2-24a^2-48a-24+b^2-1\)
\(=-19a^2+48a+b^2-25+4ab-4a-b^2+2b-1\)
\(=-19a^2+4ab+44a+2b-26\)