Method of substitution is used. Step-by-step solution is requested. How do we integrate when u = [ 1 - sin( x ) ]?

enter image source here

Method of Substitution used.
u = 1 - Sin(x)
Hence, du = - Cos(x) dx
Is this method correct?

enter image source here