Let xy be the number. x is the tens digit, y is the units digit. The ratio of the units digit to the tens digit, y/x, is 1/2. This gives us the proportion
y/x = 1/2
The tens digit is 2 more than the units digit; x = y+2; substituting in our proportion we have y/(y+2) = 1/2