SmokerAtStadium’s answer is exactly right; this is just a supplement to help you with the grammar in future constructions of this sort.
You have three propositions here:
- Those are the people.
- They have been talking to my cousin.
- I don’t want that.
You start by combining (2) and (3) into a single sentence in which (2) replaces that in (3).
The lexical ‘rule’ for want is that it will not take a finite clause as its object—that is, one in which the verb is inflected for tense.
✲I don’t want that they talk to my cousin.
Want requires a non-finite clause, in which the verb is replaced by either a marked infinitive (to talk) or a gerund (talking). In such clauses the subject is recast in the objective case†:
they⇨them have been talking⇨talking/to talk to my cousin
2a. I don’t want them talking/to talk to my cousin.
Now you combine (1) and (2a) into a single sentence, with (2a) as a relative clause identifying the people in (1).
To do this you replace the personal pronoun them in (2a) with a relative pronoun whom or that, and move that to the head of the sentence:
whom I don’t want
them talking/to talk to my cousin.
⇦ • • • • • • • ⇦
Note, however, that this is not possible if the pronoun has been cast in the genitive case (see the note† below): I don’t want their talking... In that case, the pronoun is a modifier on talking, and has to remain attached to it: whose talking to my cousin I don't want.
Now you simply append the relative clause to the noun phrase it modifies:
1a. Those are the people whom I don’t want talking/to talk to my cousin.
This is optional: a relative pronoun which (a) is the object of the verb in the clause which it heads and (b) follows the noun or noun phrase it modifies may be deleted:
1b. Those are the people
whom I don't want talking/to talk to my cousin.
✲ marks an utterance as unacceptable
† The genitive case—their talking—is also possible with the gerund (but not the infinitive), and at one time some grammarians insisted it was the only proper construction with the gerund; but that never reflected actual practice, and the objective is often (perhaps even usually) found in even the most formal writing today. By and large, the genitive is used only when the action of the verb is to be stressed and its subject backgrounded. But there are lexical factors in play, too: you are unlikely to see I don’t want their talking..., but I don’t like their talking... is for some reason more acceptable. See this question on ELU