The quotient rule allows you to differentiate functions that can be written as the quotient of two other functions, #f(x)# and #g(x)#, by using the formula
#color(blue)(d/dx(y) = (f^'(x) * g(x) - f(x) * g^'(x))/[(g(x)]^2)#, where #g(x) !=0#
Your function can be written as
#y = f(x)/g(x) = (3 + sinx)/(3x + cosx)#
You also need to remember that
#d/dx(sinx) = cosx#
and
#d/dx(cosx) = -sinx#
So, the derivative of #f(x)# will be
#d/dx(f(x)) = d/dx(3 + sinx)#
#d/dx(f(x)) = d/dx(3) + d/dx(sinx)#
#d/dx(f(x)) = 0 + cosx = cosx#
The derivative of #g(x)# will be
#d/dx(g(x)) = d/dx(3x + cosx)#
#d/dx(g(x)) = d/dx(3x) + d/dx(cosx) = 3 - sinx#
Plug these values into the formula for the quotient product to get
#y^' = (cosx * (3x + cosx) - (3 + sinx) * (3 - sinx))/(3x + cosx)^2#
Use the formula for the difference of two perfect squares to write
#color(blue)(a^2 - b^2 = (a-b)(a+b)#
#y^' = (3x * cosx + cos^2x - (3^2 - sin^2x))/(3x + cosx)^2#
#y^' = (3x * cosx + cos^2x - 9 + sin^2x)/(3x + cosx)^2#
You can further simplify this expression by using the fact that
#color(blue)(cos^2x + sin^2x = 1)#
so that you get
#y^' = (3x * cosx - 9 + overbrace(sin^2x + cos^2x)^(color(blue)(=1)))/(3x + cosx)^2#
#y^' = (3x * cosx - 9 +1)/(3x + cosx)^2 = color(green)((3x * cosx - 8)/(3x + cosx)^2)#