So that the problem will have only positive integer solutions, I will change the
first sentence from
Matej and Anton are 44 years old together.
to
Matej and Anton are 48 years old together.
-------------------------
Matej and Anton are 48 years old together.
eq. 1: M + A = 48
Matej is twice as old as Anton was...
eq. 2: M = 2(A - ?)
Let that be x years ago.
eq. 2: M = 2(A - x)
...when Matej was half as old as Anton will be...
eq. 3: M - x = (1/2)(A + ?)
Let that be y years from now.
eq. 3 M - x = (1/2)(A + y)
when Anton is 3 times older than Matej was...
eq. 4 A + y = 3(M - ?)
Let that be z years ago.
eq. 4 A + y = 3(M - z)
when Matej was 3 times as old as Anton.
eq. 5 M - z = 3(A - z)
How old is Matej?
One of the other tutors will probably solve it by hand. But if you go to:
https://www.wolframalpha.com/
and type in
M+A=48, M=2(A-x), M-x=(1/2)(A+y), A+y=3(M-z), M-z=3(A-z)
you will see:
A=18, M=30, x=3, y=36, z=12
So the answer is: Matej is 30 years old.
Edwin