To know what is the better buy we have to know how much does each GB cost in each case.
For the 4 GB flash drive we have that
then each GB cost $2.
For the 2 GB flash drive we have that
then each GB cost $3.
Finally for the 8 GB we have that
then each GB cost $1.63.
Comparing the prices for each GB we conclude that the best buy is the 8 GB flash drive.