Let us say we have x, y and z hours put be the three types of laborers, I, II, III respectively
Thus we get x + y + z = 500 ------ ( 1 )
where 'z' has to be maximum
Also we are given the expenditure.
8x + 6y + 5z = 2800 ----- ( 2 )
From (1) we get x = 500 - y - z
Plugging it in equation (2), we get
8( 500 - y - z ) + 6y + 5z = 2800
4000 - 8y - 8z + 6y + 5z = 2800
2y + 3z = 1200
Since z has to be largest and total number of hours is 500 we try z = 300
That will give
y = 150
Plugging in these values in (1) we get x = 50.
We can verify that this solution which satisfies the given conditions