There are two ways in which this we can do this,
The first is explanding the brackets to get 1+2x+x2 and differentiating to get 2+2x.
The second way is using the chain rule, let u=1+x such that y=u2 and differentiate both equations to get du/dx=1 and dy/du=2u. (du/dx)(dy/du) = dy/dx. plug theses together and we get dy/dx = 2u. To finish off we will need to have the answer in its original form of in terms of x's so plug in u=1+x to gain 2+2x
As you may see both ways generated the same answer. It doesn't matter which way you do alsong as you remember the rules, I will personally do both to double check my answer.