## Task 1 - 050511

In three compartments of a railway carriage, there are 90 passengers. If 12 passengers were to move from the first compartment to the second, and 9 passengers from the second to the third, then there would be the same number of people in all three compartments.

How many passengers were originally in each of the compartments?
If 90 passengers are evenly distributed across 3 compartments, there are 30 passengers in each compartment.

If 12 passengers move from the first to the second compartment, then initially there are 12 too many in the first, i.e., 42 passengers. If 9 passengers must move from the second to the third compartment to achieve 30 passengers, then initially 9 are missing in the third compartment, i.e., there are 21 passengers in the third compartment before the transfer.

Thus, initially in the second compartment, there are $90-42-21=27$ passengers.