Answer: 9 days
Step-by-step explanation:
Let x represent James' daily wage
James' daily wage was $5 more than Davis's. It means that Davis's daily wage will be $(x-5)
Let y represent number of days that James worked. James worked 3 days less than David. It means that the number of days that Davis worked would be (y + 3) days
they earned $180 each. Total amount of money earned by either of of them is the product of wage and the number of days worked.
Since James earned $180, then
180 = xy - - - - - - - - 1
Since Davis also earned $180, then
180 = (x - 5)(y + 3)
xy +3x -5y -15 = 180 - - - - - - - - 2
Substituting xy = 180 into equation 2
It becomes
180 + 3x - 5y -15 = 180
3x - 5y = 180 - 180 + 15
3x - 5y = 15 - - - - - - -3
From equation 1, x = 180/y
Substituting x = 180/y into equation 3, it becomes
3 × 180/y - 5y = 15
540 - 5y^2 = 15y
5y^2 + 15y -540 = 0
Dividing through by 5
y^2 + 3y -108 = 0
y^2 + 12y - 9y -108 = 0
y(y + 12) - 9(y + 12) = 0
y + 12 = 0 or y - 9 = 0
y = -12 or y = 9
Since the number of days cannot be negative, then,
Number of days that James worked will be 9 days