Answer: 47
Step-by-step explanation: Let's call the number of chairs Liam has x. We can set up the following equations to represent the problem:
7r = x - 5
5r = x - 17
Where r is the length of each row.
To solve for x, we can set the two equations equal to each other:
7r = x - 5
5r = x - 17
Then we can solve for x by combining like terms and solving for the value of x:
7r - 5r = x - 5 - x + 17
2r = 12
r = 6
We can substitute the value of r back into either of the original equations to solve for x:
7r = x - 5
7 * 6 = x - 5
x = 47
Therefore, Liam has 47 chairs.