This is an item involving the use of ratio and proportion. The ratio between the the cost and the number of juice boxes should always be equal. With this,
($27 / 18 juice boxes) = (x / 24 juice boxes)
Solving x from the equation gives x = 36. Thus, 24 juice boxes cost $36.