Hmm I don't think I'm getting it because I'm trying to follow the method for this question and it's not working out either.
No problem! Let's take it step by step.

The first thing to note is what you will be substituting. The question gives you the substitution, so it's in our best interest to use it.
When we're differentiating both sides it's important to note that u is a function of x, so to differentiate it, we use the chain rule. That is, we differentiate the outside function (u^2 becomes 2u), and then the inside function which is just du/dx. So, the differential of the left hand side is just (du/dx) * 2u. Differentiating the right hand side should be simpler. The goal here is to make dx the subject because we're translating it from x to the u world.
The next part now is to consider the numerator. We need to translate x in terms of u. To do this, we consider u^2 = x + 2. We just simple make x the subject, and from there x = u^2 - 2. Thus, the numerator becomes u^2 - 4.
Notice that we've established dx as 2udu, sqrt(x + 2) as u, and x-2 as u^2 - 4. Do you think you could establish the new integral from here?