Let x = the first number and y = the second number. We can form the following system of linear equations
y - 3x = 3
x + y = 31
Solve the top equation for y.
y = 3x + 3
Substitute this into the second equation
x + (3x + 3) = 31
4x + 3 = 31
4x = 28
x = 7
Since the sum of the two numbers is 31, it is obvious that x = 7 is the smaller of the two numbers