the sum of the ages of rex, ben and alfred is 36 years, two years ago, ben was 3 times as old as rex was then, 8 years from now, alfred will be twice as old as ben will be then. find their present age.

To solve this problem, let's assign variables to represent the ages of Rex, Ben, and Alfred. Let's let R represent Rex's age, B represent Ben's age, and A represent Alfred's age.

Step 1: Translate the given information into equations:
1) "The sum of the ages of Rex, Ben, and Alfred is 36 years." This can be written as: R + B + A = 36. (Equation 1)
2) "Two years ago, Ben was 3 times as old as Rex was then." This can be written as: B - 2 = 3(R - 2). (Equation 2)
3) "Eight years from now, Alfred will be twice as old as Ben will be then." This can be written as: A + 8 = 2(B + 8). (Equation 3)

Step 2: Simplify the equations:
2) B - 2 = 3R - 6
B - 3R = -4
3) A + 8 = 2B + 16
A - 2B = 8

Step 3: Solve the system of equations:
To solve this system of equations, we can use the method of elimination or substitution. Let's use the elimination method:

Multiply Equation 2 by 2:
2B - 6R = -8

Add Equation 3 to the modified Equation 2:
(A - 2B) + (2B - 6R) = 8 + (-8)
A - 6R = 0
A = 6R

Substitute the value of A in Equation 1:
R + B + 6R = 36
7R + B = 36 (Equation 4)

Substitute the value of A in Equation 3:
6R + 8 = 2B + 16
6R - 2B = 8 (Equation 5)

Now we have a system of two equations with two variables (Equations 4 and 5). We can solve this system of equations to find the values of R and B.

Subtract Equation 5 from Equation 4:
(7R + B) - (6R - 2B) = 36 - 8
7R + B - 6R + 2B = 28
R + 3B = 28 (Equation 6)

Now, we can solve Equations 6 and 5 simultaneously:
R + 3B = 28 (Equation 6)
6R - 2B = 8 (Equation 5)

Multiply Equation 5 by 3:
18R - 6B = 24 (Equation 7)

Now, add Equation 7 to Equation 6:
R + 18R + 3B - 6B = 28 + 24
19R - 3B = 52 (Equation 8)

Multiply Equation 6 by 3:
3R + 9B = 84 (Equation 9)

Now, add Equation 9 to Equation 8:
19R - 3B + 3R + 9B = 52 + 84
22R + 6B = 136

Now, we have a new equation:
22R + 6B = 136 (Equation 10)

Divide Equation 10 by 2 to simplify:
11R + 3B = 68 (Equation 11)

Now, we have a new system of equations:
11R + 3B = 68 (Equation 11)
R + 3B = 28 (Equation 6)

Multiply Equation 6 by -11:
-11R - 33B = -308

Add Equation 11 to Equation 6:
-11R - 33B + 11R + 3B = -308 + 68
-30B = -240
B = 8

Substitute the value of B in Equation 6:
R + 3(8) = 28
R + 24 = 28
R = 4

Substitute the values of R and B in Equation 1:
4 + 8 + A = 36
12 + A = 36
A = 24

Therefore, the present ages of Rex, Ben, and Alfred are:
Rex (R) = 4 years old,
Ben (B) = 8 years old,
Alfred (A) = 24 years old.