The second package costs $2 for each pair of socks. If the first package cost that much, it would be 8×$2 = $16 for 8 pairs of socks. That is not the same as $12 for 8 pairs.
__
Another way to look at it is the first package costs twice as much as the second, but has more than twice as many pairs of socks. That means the rates are not equivalent.