First we need to use the quotient rule:
#(df)/dx = ( (x^2+2)^2 d/dx ((2x-5)^5) - (2x-5)^5 d/dx ( (x^2+2)^2))/ (x^2+2)^4#
Now using the chain rule:
#d/dx ((2x-5)^5) = 5(2x-5)^4 d/dx (2x-5) = 10(2x-5)^4#
#d/dx ( (x^2+2)^2)) = 2(x^2+2)d/dx (x^2+2) = 4x(x^2+2)#
so:
#(df)/dx = ( 10(x^2+2)^2 (2x-5)^4 - 4x (2x-5)^5 (x^2+2))/ (x^2+2)^4#
#(df)/dx = ( 10(x^2+2) (2x-5)^4 - 4x (2x-5)^5 )/ (x^2+2)^3#
#(df)/dx = ( (2x-5)^4(10(x^2+2) - 4x (2x-5) ))/ (x^2+2)^3#
#(df)/dx = ( (2x-5)^4(10x^2+20 - 8x^2+20x ))/ (x^2+2)^3#
#(df)/dx = ( (2x-5)^4(2x^2+20x+20))/ (x^2+2)^3#