The solution 1 is classified first and then divided into steps.
(1) Neither Party A nor Party B has been selected. Assign work to the other three people, and the method number is a (3,3) = 6;
(2) Party A and Party B only choose one. First, two people are selected from the remaining three people, then 1 person is selected from the selected two people as the cultural and recreational committee member, and finally, A (or B) and the remaining 1 person are assigned jobs. The method number is 2c (3,2) c (2,1) a (2,2) = 24;
(3) Choose both sides. First, choose 1 person from the other three people as the cultural and entertainment committee members, and then assign the work to Party A and Party B. The method number is C(3,1) a (2,2) = 6;
The total number of methods is a (3,3)+2c (3,2) c (2,1) a (2,2)+c (3,1) a (2,2) = 36.
Solution 2 Negative thinking.
Choose 3 out of 5 people, the method number is a (5,3) = 60, the method number of Party A as a cultural and entertainment committee member is a (4,2) =12, and the method number of Party B as a cultural and entertainment committee member is a (4,2) =12, so the method number is a (5,3)-.