Answer
$$\frac{{dy}}{{dx}} = g{\left( x \right)^{h\left( x \right) - 1}}g'\left( x \right)h\left( x \right) + g{\left( x \right)^{h\left( x \right)}}h'\left( x \right)\ln g\left( x \right)$$
Work Step by Step
$$\eqalign{
& y = g{\left( x \right)^{h\left( x \right)}} \cr
& \left( i \right){\text{Using the fact that }}{b^x} = {e^{x\ln b}},{\text{ then}} \cr
& y = {e^{h\left( x \right)\ln \left( {g\left( x \right)} \right)}} \cr
& {\text{Differentiating}} \cr
& \frac{{dy}}{{dx}} = {e^{h\left( x \right)\ln \left( {g\left( x \right)} \right)}}\frac{d}{{dx}}\left[ {h\left( x \right)\ln \left( {g\left( x \right)} \right)} \right] \cr
& \frac{{dy}}{{dx}} = {e^{h\left( x \right)\ln \left( {g\left( x \right)} \right)}}\left[ {h\left( x \right)\left( {\frac{{g'\left( x \right)}}{{g\left( x \right)}}} \right) + h'\left( x \right)\ln \left( {g\left( x \right)} \right)} \right] \cr
& \frac{{dy}}{{dx}} = {e^{h\left( x \right)\ln \left( {g\left( x \right)} \right)}}\left[ {\frac{{g'\left( x \right)h\left( x \right)}}{{g\left( x \right)}} + h'\left( x \right)\ln \left( {g\left( x \right)} \right)} \right] \cr
& {\text{Substitute }}g{\left( x \right)^{h\left( x \right)}}{\text{ for }}{e^{h\left( x \right)\ln \left( {g\left( x \right)} \right)}} \cr
& \frac{{dy}}{{dx}} = g{\left( x \right)^{h\left( x \right)}}\left[ {\frac{{g'\left( x \right)h\left( x \right)}}{{g\left( x \right)}} + h'\left( x \right)\ln \left( {g\left( x \right)} \right)} \right] \cr
& \frac{{dy}}{{dx}} = g{\left( x \right)^{h\left( x \right) - 1}}g'\left( x \right)h\left( x \right) + g{\left( x \right)^{h\left( x \right)}}h'\left( x \right)\ln \left( {g\left( x \right)} \right) \cr
& \cr
& \left( {ii} \right){\text{Using the logarithmic differentiation}} \cr
& \ln y = \ln g{\left( x \right)^{h\left( x \right)}} \cr
& \ln y = h\left( x \right)\ln g\left( x \right) \cr
& {\text{Differentiate both sides}} \cr
& \frac{1}{y}\frac{{dy}}{{dx}} = h\left( x \right)\left( {\frac{{g'\left( x \right)}}{{g\left( x \right)}}} \right) + \ln g\left( x \right)h'\left( x \right) \cr
& \frac{1}{y}\frac{{dy}}{{dx}} = \frac{{h\left( x \right)g'\left( x \right)}}{{g\left( x \right)}} + \ln g\left( x \right)h'\left( x \right) \cr
& {\text{Solving for }}\frac{{dy}}{{dx}} \cr
& \frac{{dy}}{{dx}} = y\frac{{h\left( x \right)g'\left( x \right)}}{{g\left( x \right)}} + y\ln g\left( x \right)h'\left( x \right) \cr
& {\text{Where }}y = g{\left( x \right)^{h\left( x \right)}} \cr
& \frac{{dy}}{{dx}} = \frac{{g{{\left( x \right)}^{h\left( x \right)}}h\left( x \right)g'\left( x \right)}}{{g\left( x \right)}} + g{\left( x \right)^{h\left( x \right)}}\ln g\left( x \right)h'\left( x \right) \cr
& \frac{{dy}}{{dx}} = g{\left( x \right)^{h\left( x \right) - 1}}g'\left( x \right)h\left( x \right) + g{\left( x \right)^{h\left( x \right)}}h'\left( x \right)\ln g\left( x \right) \cr} $$