Let the smallest, the middle, and the largest number. The system is

, , and

Substitute the second equation into the first: or

Add this to the third equation: or

Substitute into the previous equation to get , so

Substitute into the second equation to get .