randRange(3, 5) randRange(2, 20) randRange(1, 10) * (C - 1)

{person(1) is A years older than person(2)|person(2) is A years younger than person(1)}. {For the last {four|3|two} years, person(1) and person(2) have been going to the same school.|person(1) and person(2) first met 3 years ago.|} Cardinal(B) years ago, person(1) was C times {as old as|older than} person(2).

How old is person(1) now?

(C * (B + A) - B) / (C - 1)

Let person(1)'s current age be personVar(1).

That means that B years ago, person(1) was personVar(1) - B years old.

person(2) is personVar(1) - A years old right now, so B years ago, he(2) was (personVar(1) - A) - B = personVar(1) - A + B years old.

person(1) was C times as old as person(2), so that means personVar(1) - B = C (personVar(1) - A + B).

Expand: personVar(1) - B = C personVar(1) - C * (A + B).

Solve for personVar(1) to get C - 1 personVar(1) = C * (A + B) - B; personVar(1) = (C * (B + A) - B) / (C - 1).

person(1) is A years older than person(2). Cardinal(B) years ago, person(1) was C times as old as person(2).

How old is person(2) now?

(A - B + C * B) / (C - 1)

Let person(2)'s current age be personVar(2).

That means that person(1) is currently personVar(2) + A years old and B years ago, person(1) was (personVar(2) + A) - B = personVar(2) + A - B years old.

Cardinal(B) years ago, person(2) was personVar(2) - B years old.

person(1) was C times as old as person(2), so that means personVar(2) + A - B = C (personVar(2) - B).

Expand: personVar(2) + A - B = C personVar(2) - C * B.

Solve for personVar(2) to get C - 1 personVar(2) = A - B + C * B; personVar(2) = (A - B + C * B) / (C - 1).

randRange(3, 5) randRange(2, 10) * (C - 1)

person(1) is C times as old as person(2) and is also A years older than person(2).

How old is person(1)?

A * C / (C - 1)

Let person(1)'s age be personVar(1).

We know person(2) is 1/C as old as person(1), so person(2)'s age can be written as personVar(1) / C.

His(2) age can also be written as personVar(1) - A.

Set the two expressions for person(2)'s age equal to each other: personVar(1) / C = personVar(1) - A.

Multiply both sides by C to get personVar(1) = C personVar(1) - A * C.

Solve for personVar(1) to get C - 1 personVar(1) = A * C; personVar(1) = A * C / (C - 1).

person(1) is C times as old as person(2) and is also A years older than person(2).

How old is person(2)?

A / (C - 1)

Let person(2)'s age be personVar(2).

We know person(1) is C times as old as person(2), so person(1)'s age can be written as C personVar(2).

His(1) age can also be written as personVar(2) + A.

Set the two expressions for person(1)'s age equal to each other: C personVar(2) = personVar(2) + A.

Solve for personVar(2) to get C - 1 personVar(2) = A; personVar(2) = A / (C - 1).

randRange(2, 5) randRange(A + 2, 9) randRange(2, 7) * (C - A)

person(1) is A times as old as person(2). Cardinal(B) years ago, person(1) was C times as old as person(2).

How old is person(1) now?

A * B * (C - 1) / (C - A)

Let person(1)'s age be personVar(1).

We know person(2) is 1/A as old as person(1), so person(2)'s age can be written as personVar(1) / A.

B years ago, person(1) was personVar(1) - B years old and person(2) was personVar(1) / A - B years old.

At that time, person(1) was C times as old as person(2), so we can write personVar(1) - B = C (personVar(1) / A - B).

Expand: personVar(1) - B = fractionReduce(C, A) personVar(1) - C * B.

Solve for personVar(1) to get fractionReduce(C - A, A) personVar(1) = B * (C - 1); personVar(1) = fractionReduce(A, C - A) \cdot B * (C - 1) = A * B * (C - 1) / (C - A).

person(1) is A times as old as person(2). Cardinal(B) years ago, person(1) was C times as old as person(2).

How old is person(2) now?

B * (C - 1) / (C - A)

Let person(2)'s age be personVar(2).

We know person(1) is A times as old as person(2), so person(1)'s age can be written as A personVar(2).

Cardinal(B) years ago, person(1) was A personVar(2) - B years old and person(2) was personVar(2) - B years old.

At that time, person(1) was C times as old as person(2), so we can write A personVar(2) - B = C (personVar(2) - B).

Expand: A personVar(2) - B = C personVar(2) - B * C.

Solve for personVar(2) to get C - A personVar(2) = B * (C - 1); personVar(2) = B * (C - 1) / (C - A).

randRange(3, 20) randRange(7, 24) * (A - 1)

In B years, person(1) will be A times as old as he(1) is right now.

How old is he(1) right now?

B / (A - 1)

Let person(1)'s age be personVar(1).

In B years, he(1) will be personVar(1) + B years old.

At that time, he(1) will also be A personVar(1) years old.

We write personVar(1) + B = A personVar(1).

Solve for personVar(1) to get A - 1 personVar(1) = B; personVar(1) = B / (A - 1).

randRange(3, 5) randRange(1, 10) * (C - 1) randRange(C * B + 1, 15) * (C - 1)

person(1) is A years old and person(2) is B years old.

How many years will it take until person(1) is only C times as old as person(2)?

(A - B * C) / (C - 1)

Let y be the number of years that it will take.

In y years, person(1) will be A + y years old and person(2) will be B + y years old.

At that time, person(1) will be C times as old as person(2).

We write A + y = C (B + y).

Expand to get A + y = C * B + C y.

Solve for y to get C - 1 y = A - C * B; y = (A - C * B) / (C - 1).