a) \(\left(x^2+1\right)\left(x-3\right)-\left(x-3\right)\left(x^2+3x+9\right)\)
\(=\left(x-3\right)\left[x^2+1-\left(x^2+3x+9\right)\right]\)
\(=\left(x-3\right)\left(x^2+1-x^2-3x-9\right)\)
\(=\left(x-3\right)\left(-3x-8\right)\)
b) \(\left(x+2\right)^2+x\left(x+5\right)\)
\(=x^2+4x+4+x^2+5x\)
\(=2x^2+9x+4\)
c) \(\left(5x+4y\right)\left(5x-4y\right)-24x^2+15y^2\)
\(=25x^2-16y^2-24x^2+15y^2\)
\(=x^2-y^2\)
\(=\left(x+y\right)\left(x-y\right)\)