Answer
$$\frac{{2\tan x\left[ {\left( {2 + {e^x}} \right)\left( {{{\sec }^2}x} \right) - {e^x}\tan x} \right]}}{{{{\left( {2 + {e^x}} \right)}^3}}}$$
Work Step by Step
$$\eqalign{
& \frac{d}{{dx}}{\left( {\frac{{\tan x}}{{2 + {e^x}}}} \right)^2} \cr
& {\text{Use the general power rule for derivatives }}\frac{d}{{dx}}\left[ {{u^n}} \right] = n{u^{n - 1}}\frac{{du}}{{dx}} \cr
& = 2{\left( {\frac{{\tan x}}{{2 + {e^x}}}} \right)^{2 - 1}}\frac{d}{{dx}}\left( {\frac{{\tan x}}{{2 + {e^x}}}} \right) \cr
& {\text{By the quotient rule}} \cr
& = 2\left( {\frac{{\tan x}}{{2 + {e^x}}}} \right)\left( {\frac{{\left( {2 + {e^x}} \right)\left( {\tan x} \right)' - \tan x\left( {2 + {e^x}} \right)'}}{{{{\left( {2 + {e^x}} \right)}^2}}}} \right) \cr
& {\text{Computing derivatives}} \cr
& = \frac{{2\tan x}}{{{{\left( {2 + {e^x}} \right)}^3}}}\left[ {\left( {2 + {e^x}} \right)\left( {{{\sec }^2}x} \right) - \tan x\left( {{e^x}} \right)} \right] \cr
& = \frac{{2\tan x\left[ {\left( {2 + {e^x}} \right)\left( {{{\sec }^2}x} \right) - {e^x}\tan x} \right]}}{{{{\left( {2 + {e^x}} \right)}^3}}} \cr} $$