Known information:
Let us set up some variables for our terms:
Let us set up some equations in terms of our known information
Let us set up everything in terms of L, because in the first equation, we will be able to get rid of all the other variables but L allowing us to solve the equation:
(S + M) + L = 24 ---> L + L = 24
2L = 24
L = 12
Since L = 12, we know that S = L - 2:
S = L - 2 = 12 - 2 = 10
Since now we know that L = 12, and S = 10, and L = S + M:
L = S + M
12 = 10 + M
M = 2
So our answer is 2, 10, 12
Hope that helps!