Let's place the two people who refuse to work together into two different offices; this can be done in three ways (i.e. the office that receives neither can be O1, O2 or O3.
Now there are four people to be assigned. One of the offices has two available slots; this office can be staffed in 4C2 ways, i.e. 6.
Now there are two remaining persons, to be placed into two different offices (each presently staffed by one person); this can be done in two ways.
I calculate the product of all these possibilities as 3(6)(2) = 36.