et up 2 equations to solve for 2 unknowns. Let A = Ama’s age and K = Kofi’s age.
So 3A=K+4 1st equation or
3A - K = 4 Moved unknown K to left of = sign.
A+3+K+3=30 2nd equation, next move numeric values to right of = sign.
A + K = 24 Add to 1st equation to eliminate K from the equation
3A - K = 4 Copied from above, now add.
4A = 28 Divide by 4
A = 7 This is Ama’s age. Substitute 7 for A in equations A + K = 24
7 + K = 24 subtract 7
K = 17 This is Kofi’s age.