Ten years ago a man was three times as old as his son. In twelve more years,the son is three fifths as old as his father.what were their ages 5 years ago?

10 years ago:

son --- x
father --- 3x

NOW:
son --- x+10
father --- 3x+10

12 years from now:
son --- x+22
father -- 3x + 22

x+22 = (3/5)(3x + 22)
times 5
5x + 110 = 9x + 66
-4x = -44
x = 11

so 5 years ago:
son = present age - 5
= (11+10) - 5 = 16
father = 3x+10 - 5 = 38

So 5 years ago, the son was 16, and the father was 38

(right now the son is 21, and the father is 43)

To solve this problem, let's assign variables to represent the ages of the man and his son.

Let's say the man's age is represented by M, and the son's age is represented by S.

Based on the given information, we can create two equations:

1. "Ten years ago, a man was three times as old as his son":
M - 10 = 3(S - 10)

2. "In twelve more years, the son is three fifths as old as his father":
S + 12 = (3/5)(M + 12)

We can simplify these equations further:

1. M - 10 = 3S - 30 --> M - 3S = -20

2. 5(S + 12) = 3(M + 12) --> 5S + 60 = 3M + 36 --> 5S - 3M = -24

We now have a system of equations:

M - 3S = -20
5S - 3M = -24

To find their ages 5 years ago, we need to solve these equations.

1. Simplify the first equation by multiplying it by 3:
3M - 9S = -60

2. Add this equation to the second equation:
3M + 5S - 9S = -24 - 60
3M - 4S = -84

Now we have a new equation:

3M - 4S = -84

3. Multiply the first equation by -4:
-4M + 12S = 80

4. Add this equation to the new equation:
3M - 4S + (-4M + 12S) = -84 + 80
-M + 8S = -4

5. Multiply this equation by -1 to eliminate the negative sign on M:
M - 8S = 4

Now, we have a new equation:

M - 8S = 4

6. Add this new equation to the first equation:
(M - 3S) + (M - 8S) = -20 + 4
2M - 11S = -16

Solving these equations for M and S will give us their current ages. Then, we can calculate their ages 5 years ago.

Please note that this solution involves solving a linear system of equations and cannot be further simplified. It requires substitution, elimination, or matrix methods to solve.