To find the better buy, we need to find the cost per nike tennis ball at each cost.
For the case of 12 nike balls for the cost of $22.45, to find the cost of only 1 ball, we have to divide the cost $22.45 by the number of tennis balls 12:

Each tennis ball in this case costs $1.87
Let's compare this with the second case.
For the case of 8 nike tennis bals for $15.99, we divide cost by number of balls again to find the cost of only 1 tennis ball:

Each tennis ball in this case costs $1.99
Thus, the better buy is the first case:
12 nike tennis balls for $22.45
Because the cost per tennis ball is cheaper than in the second case.