If person A and person B will not work together there are 3 scenarios

Case 1: Neither A nor B is chosen

Case 2: A is chosen and B isn't

Case 3: B is chosen and A isn't

Find out how many ways a team can be formed in each case.

Alternatively,

The 4th and last case is that both are picked which isn't allowed. The number number of ways A and B are chosen together plus the sum of the ways in which they aren't chosen together is the total number of ways you can make a team of 4 without restrictions.