For the first and for the second after a substitution you have to compute, up to a constant, .
It's a method known as trigonometric substitution, and takes some inspired guesswork. Basically, the fact that derivatives of trig functions are trig functions, and through the Pythagorean Theorem, we can usually simplify a trig expression and cancel with the derivative, to make the integral easy to evaluate.
Here we have something of the form , so the identity tells us a substitution of the form is appropriate.
And notice that , which makes a combination that is easy to evaluate, as per Skeeter's post.
ask your "lecturer" about trig subs ...
Pauls Online Notes : Calculus II - Trig Substitutions