If one person is 3 times the age of a second person and in 18 years the first person is twice the second​ person's age, how old are the two​ people?

Let's denote the ages of the two people as person 1 (P1) and person 2 (P2).

Given:
P1 = 3P2
After 18 years:
P1 + 18 = 2(P2 + 18)

Substitute P1 = 3P2 into the second equation:
3P2 + 18 = 2(P2 + 18)
3P2 + 18 = 2P2 + 36
3P2 - 2P2 = 36 - 18
P2 = 18

Now substitute P2 = 18 into the first equation:
P1 = 3(18)
P1 = 54

Therefore, the first person is 54 years old and the second person is 18 years old.