# Q. A person P asks one of his three friends X as to how much money he had. X replied, “If Y given me Rs. 40, then Y will have half of as much as Z, but if Z gives me Rs. 40, then three of us will have equal amount.” What is the total amount of money that X, Y and Z have ?

(a) Rs. 420

(b) Rs. 360

(c) Rs. 300

(d) Rs. 270

Correct Answer: (b) Rs. 360

#### Question from UPSC Prelims 2021 CSAT Paper

**Explanation : **

## Money Distribution

Let’s say X has x rupees, Y has y rupees, and Z has z rupees.

According to X’s first statement, if Y gives him Rs. 40, then Y will have half as much as Z. So we can write an equation to represent this: y – 40 = (1/2)z.

According to X’s second statement, if Z gives him Rs. 40, then all three of them will have an equal amount of money. So we can write another equation to represent this: x + 40 = y = z – 40.

Solving these two equations simultaneously for x, y, and z, we get:

y – 40 = (1/2)z ; 2y – 80 = z

Substituting this value of z in the second equation: x + 40 = y = z – 40

x + 40 = y = (2y – 80) – 40

x + 40 = y = 2y -120 ; y=120

So, x=80, z=160