See the proof in the explanation.
##sin^2x/(1-cosx)##
Multiply the numerator and denominator both by the conjugate of the denominator. This is a fancy 1 that does not affect the value of the expression.
##sin^2x/(1-cosx)*(1+cosx)/(1+cosx)##
This sets up a Difference of Squares in the denominator. Resist the urge to distribute in the numerator.
##[(sin^2x)(1+cosx)]/((1)^2-(cosx)^2)=[(sin^2x)(1+cosx)]/(1-cos^2x)##
Use the Pythagorean Identity ##sin^2x+cos^2=1## to replace the 1 in your denominator.
##[(sin^2x)(1+cosx)]/((sin^2x+cos^x)-cos^2x)##
Simplify the denominator.
##[(sin^2x)(1+cosx)]/((sin^2x)##
Simplify the fraction.
##1+cosx##
QED.