$164$ owned cats or dogs.
Work Step by Step
If $A$ is the set of people who owned cats, and $B$ is the set of people who owned dogs, then: $n(A)=96$ people owned cats. $n(B)=97$ people owned dogs. $n(A\cap B)=29$ people owned cats and dogs. $n(A\cup B)=?$ people who owned cats or dogs. The formula for the cardinality of the union of two sets: $n(A\cup B)=n(A)+n(B)-n(A\cap B)$ $n(A\cup B)=96+97-29=164$ $164$ owned cats or dogs.