We assume, that the number 50 is 100% - because it's the output value of the task.
We assume, that x is the value we are looking for.
If 100% equals 50, so we can write it down as 100%=50.
We know, that x% equals 20 of the output value, so we can write it down as x%=20.
Now we have two simple equations:
1) 100%=50
2) x%=20
where left sides of both of them have the same units, and both right sides have the same units, so we can do something like that:
100%/x%=50/20
Now we just have to solve the simple equation, and we will get the solution we are looking for.
100%/x%=50/20
(100/x)*x=(50/20)*x
100=2.5*x
100/2.5=x
40=x
x=40