To answer this question, you need trigonometry.
Are you familiar with the chant soh cah toa?
In here, you can see that the side you have is adjacent to the angle you have, and you're trying to find the opposite side. This means you need tangent = opposite ÷ adjacent
If the angle was 30° 45° or 60° Then there is a table you can use to calculate, but there isn't so just use a calculator
tan 31° = x ÷ 10