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.