It can actually be done many ways. You must match up the corresponding sides.
For example, 24/20 and x/7 would work so would, 24/x and 20/7, and 7/20 and x/24. Most proportions are set up the same way. You just have to make sure to go in the same order for the two triangles. Sorry if it's confusing.
So let's use-20/7 and 24/x.
First, we multiply 7*24 and 20*x and we get 20x=168
Then we divide to get 168/20. X=8.4