Please explain to me how to know whether to put the x up or down

SOLUTION:
Case: Direct Proportion
Given: Several cases of direct proportions.
3 ounces of perfume for $99
8 ounces will be for x dollars
Required: To find the value of x in dollars
Method:
[tex]\begin{gathered} 3\text{ ounces for 99 dollars} \\ 8\text{ ounces for x dollars} \\ 3\equiv\text{ 99} \\ 8\text{ = x} \\ \text{Cross multiplying} \\ 3\text{ }\times\text{ x = 8 }\times\text{ 99} \\ 3x\text{ =792} \\ \text{Dividing both sides by 3} \\ x\text{ = 264} \end{gathered}[/tex]Final answer:
8 ounces of perfume will cost $264