The first thing that we have to do is to assign variables to the cat's and the dog's ages. Let us use c to represent the age of the cat and d for the dog's age. So, let's translate the word problem into a mathematical one.
c = d + 3
This is the first equation while the second equation is
(d+3)*d = 54
which becomes
d^2 +3d -54 = 0
which can be factored into (d-6)(d+9). This gives us two roots which are 6 and -9. However, age is a non-negative number so we will take 6 as the age of Helen's dog. Thus, making Sally's cat 9 years old.