im assuming that you mean 4/(x+1)-2/(x+2)
first get a common denominator of (x+1)(x+2)
multiply 4/(x+1) times (x+2)/(x+2) and get (4x+8)/[(x+1)(x+2)]
then multiply -2/(x+2) times (x+1)/(x+1) and get (-2x-2)/[(x+1)(x+2)]
next connect like parts
(4x+8-2x-2)/[(x+1)(x+2)]
the answer is (2x+6)/[(x+1)(x+2)]