In each case divide the price by the number of cans.
The best buy is the lowest price.
$12.53/7 = $1.79
$5.97/3 = $1.99
$7.95/5 = $1.59
$8.34/6 = $1.39
The fourth ad, $8.34 for 6 cans results in the lowest price per can, $1.39.
The fourth ad is the best buy.