If you let X = a week

Then the guys coming for 4 days are coming for 4/7X weeks

Then Total days the guys spend is

10X + 10(4/7)X = 5646

Solving for X we get X=359.3 which is cost per guy who is staying a week

The guys who are staying for 4 days stay for 4/7X which is 4/7(359.29)= 205.3

Checking answer.

10 guys at 359.3 = 3593

10 guys at 205.3 = 2053

Add these together and you get the total cost to be 5646 as we had in the question.