You can solve this w/out even writing a single thing down.
[1] 2/5 = 40%
Since you have (something/20) it still must equal 40%. Since you multiply the denominator by 4 on [1] to get 20 as the new denominator, the new numerator must also be multiplied by 4. 2 * 4 = 8. Since 10 - 2 = 8, then x must be 10.