I squared sqrt(x-8)+2. For the purpose of this explanation let sqrt(x-8) equal y.

So here we go.

sqrt(x-8)+2; sqrt(x-8)=y

Substitute.

y+2

Square it.

(y+2)(y+2)=y^2+4y+4

Substitute again.

[sqrt(x-8)]^2+4[sqrt(x-8)]+4

Simplify.

(x-8)+4sqrt(x-8)+4

Simplify more.

x-4+4sqrt(x-8).

Basically, when you square sqrt(x-8)+2, you have to treat it like you would squaring y+2, in other words, you square the y, add the product of 2 times y and 2 times y and square the 2.