\[ \boxed { {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) +h \left ( y \left ( x \right ) \right ) \left ( {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) \right ) ^{2}+g \left ( x \right ) {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) =0} \]
Mathematica: cpu = 2.378802 (sec), leaf count = 57 \[ \left \{\left \{y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}} e^{-\int _1^{K[4]} -h(K[1]) \, dK[1]} \, dK[4]\& \right ]\left [\int _1^x c_1 \left (-e^{-\int _1^{K[5]} g(K[2]) \, dK[2]}\right ) \, dK[5]+c_2\right ]\right \}\right \} \]
Maple: cpu = 0.032 (sec), leaf count = 29 \[ \left \{ \int ^{y \left ( x \right ) }\!{{\rm e}^{\int \!h \left ( {\it \_b} \right ) \,{\rm d}{\it \_b}}}{d{\it \_b}}-{\it \_C1}\,\int \!{ {\rm e}^{-\int \!g \left ( x \right ) \,{\rm d}x}}\,{\rm d}x-{\it \_C2}=0 \right \} \]