X+(x+)+ (X+2)=3x+ 3 then anotgher student wrote (X-1)+ X + (X+1)=3X which one is correct

X+(x+)+ (X+2)= = 3x + 2

(X-1)+ X + (X+1)= 3x