Here’s my case:
I have 3 cats and 2 dogs. (The) cats live in the house and (the) dogs live in the doghouse.
I think it’s required because this is specific. So do we need “the” here?
if you are talking about the actual cats and dogs that you currently have, and the composition of your pet collection is (reasonably) constant, you can use the definite article, as you suggest, to talk about their accommodation. If you are talking generally about your pet-housing policy, especially if you have plans to get more cats or dogs, or both, you could omit the article. Note that many style guides advise writing numbers as words if they are smaller than some threshold (often 11), so that they would advise "I have three cats and two dogs".