Since the triangles are similar, a proportion can be made.
12 = 3 * ? and 20 = ? * ?
We know that 3 * 4 = 12, so the proportion must be by 4.
Replace 4 into one of the question marks in 20 = ? * ?.
20 = 4 * ?
We know that 4 * 5 = 20, so x must equal 5.
Your answer is 5.