John and Ernest are close friends.ernest is 5 years younger than John. in ten years John's age will be 3 times Ernest age. Find their ages.

present ages:

John ---- x
Ernie --- x-5

in 10 years:
John --- x+10
Ernie --- x-5 + 10 = x+5

x+10 = 3(x+5)

solve for x and you will see that this question is bogus,
check your typing

How come the answer is like that

To find John and Ernest's ages, let's start by setting up equations based on the given information:

1. Ernest is 5 years younger than John. Let's represent John's age as "x", so Ernest's age would be "x - 5".

2. In ten years, John's age will be 3 times Ernest's age. So, in ten years, John's age would be "x + 10", and Ernest's age would be "(x - 5) + 10".

Now, let's set up the equation based on the second piece of information:

x + 10 = 3 * (x - 5 + 10)

Distribute the 3 on the right side:

x + 10 = 3x - 15 + 30

Combine like terms:

x + 10 = 3x + 15

Subtract x from both sides to isolate the x term:

10 = 2x + 15

Subtract 15 from both sides:

-5 = 2x

Divide both sides by 2:

-5/2 = x

Therefore, John's age (x) is -5/2 (or -2.5).

To find Ernest's age, substitute the value of x into "x - 5":

Ernest's age = -2.5 - 5 = -7.5

However, it doesn't make sense for someone to have a negative age or a fraction of a year. Therefore, it seems there might be an error in the information provided or in the calculations. Please double-check the given information or rework the calculations to find their actual ages.