Andy maximal age= 13.3
Matt maximal age= 21.7
I will translate the problem into 2 equation where X is Andy's age and Y is Matt's age.
Y+5= 2X
Y= 2X-5
X+Y<35
From this equation, it is clear that you won't be able to find their age. But you can find maximal age of Andy and Matt by changing X+Y<35 into X+Y=35
Inserting the first equation to the second equation you will get:
X+Y=35
X+ (2X-5)=35
3X= 35+5=40
X=13.3
X+Y=35
13.3+Y=35
Y= 21.7