Draw yourself two circles, overlapping by about a third.Then draw a rectangle around both of them.
The area rectangle represents all 30 families.
Let's go with assigning meanings to the circles by alphabetical order from left to right (although this ordering doesn't really matter as long as you label clearly).
So let's say the interior of the left circle represents all 12 families with Cats, and the total area exterior to the left circle but inside the rectangle (including parts both inside the right circle and not) represents the 18 families without Cats.
The interior of the right circle represents the 15 families who own Dogs, and the total area exterior to the right circle (including parts inside the left circle and the parts that are not) represents all 15 families without Dogs.
Ok, what part of the diagram represents the x families with both pets?
Ask yourself, if x families owned both cats and dogs, and 12 families owned cats, how many families own only cats (no dogs)?
We can proceed along this sort of reasoning to find the numbers inside each separate region.
But I think you may have mis-stated the question. I'm not really sure what you are asking.
x owned dogs and cats
families owned neither cats nor dogs (<--- what number owned neither?)
There isn't yet enough information to find x if you don't state how many families own no pets. Without that information, all we know is that x could be anywhere from 0 to 12.All the cat-owners may be dog-owners, in which case 3 families would own only dogs, and fifteen families would own no pets, or none of the cat-owners may own dogs, in which case, there would only be three families without a pet, and none with two pets.
Or as Brian pointed out (while I was editing my answer), the question may be asking you to find an expression for how many families own no pets, in terms of x.