Neosporin can help prevent the flu virus from getting in through your nose but you could still catch the flu virus even with Neosporin in your nose.
If you're around someone who has the flu and then the flu virus gets on your hands and then you touch your face or eyes then you can still get the flu.
Be sure to wash your hands constantly with antibacterial soap and wash them if you happen to cough in your hands or sneeze on your hands.