130k views
5 votes
Ville and Olli have candies. If Ville gave Olli 7 candy, the boys would have the same number of candies. If, on the other hand, Olli were to give Ville 7 candy, Ville would have twice as much candy as Olli has. How many candies does each have? Ville has candies: Olli has candies: Check

User Dxvargas
by
7.9k points

1 Answer

4 votes
Let's assume that Ville has x candies and Olli has y candies.

From the first statement, we know that if Ville gave 7 candies to Olli, they would have the same number of candies. This means that:

x - 7 = y + 7

Simplifying this equation, we get:

x - y = 14 ------ Equation 1

From the second statement, we know that if Olli gave 7 candies to Ville, Ville would have twice as many candies as Olli. This means that:

x + 7 = 2(y - 7)

Simplifying this equation, we get:

x - 2y = -21 ------ Equation 2

Now we have two equations with two unknowns, which we can solve using simultaneous equations.

Multiplying Equation 1 by 2 and subtracting Equation 2 from it, we get:

2(x - y) - (x - 2y) = 28 + 21

Simplifying this equation, we get:

x + 3y = 49 ------ Equation 3

We can now use Equation 1 to substitute for x in terms of y:

x = y + 14

Substituting this into Equation 3, we get:

(y + 14) + 3y = 49

Solving for y, we get:

y = 11

Substituting this value of y into Equation 1, we get:

x - 11 = 14

Solving for x, we get:

x = 25

Therefore, Ville has 25 candies and Olli has 11 candies.

To check, we can verify that if Ville gives 7 candies to Olli, they will both have 18 candies, and if Olli gives 7 candies to Ville, Ville will have 32 candies while Olli will have 4 candies, which satisfies both of the given conditions.
User Alberto Vielma
by
8.0k points

Related questions

1 answer
4 votes
169k views
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories