How ever, if you don't understand what anybody did you can tray your own substitution in transform unknown integral to elementary. You can try with
t=2 Sin(x), t=2 Cos(x) or more elementary t=2x. Note: your integral is elementary and look for the properties of Sin(x),Cos(x),Tan(x) or Tg(x),Sinh(x),Cosh(x),Tanh(x) -> they are very usefull for substitution; and look up for trick for integration "per partes".
When you want to integrate it is THE MOST IMPORTANT to know elementary integrals and with them you will know integrate more complicate intagrals - most or all complicated integrals with substitution can be transformed in elementary.