Answer: 
There would be 14 cats and 9 dogs
Explanation:
In order to find the amount of cats and dogs, we need to set up the system of equations. To do so, start by setting cats as x and dogs as y. Now we can write the first equation to show the total number of animals. 
cats + dogs = 23
x + y = 23
Now we can write a second one that shows the difference in the number of cats and dogs. 
cats - dogs = 5
x - y = 5
Now we can add the two equations together to solve for x. 
x + y = 23
x - y = 5
2x = 28
x = 14
Now that we have the number of cats, we can find the number of dogs by using either equation. 
x + y = 23
14 + y = 23
y = 9