Simply divide the price by the number of ounces to get the price per oz.
$1.39 ÷ 12 = about $.1158 cents per oz
$2.79 = 24 = about $.11625 cents per oz.
By a very small amount the $1.39 bottle is a better deal.
You could also think that $1.39 for 12 oz is $2.78 for 24 (I doubled both numbers)
$2.78 for 24oz is a drop cheaper than $2.79 for 24 oz so $1.39 is a slightly better buy.