Another vote here for considering a temporary removal of all cow's milk proteins from your 5 month old's diet to see if the symptoms go away --> wheezing can be a sign of allergy, and cow's milk is by far the most common offender in this young age group.
Most infant formula's are based on cow's milk, so I wouldn't do medication until you've done a several-week elimination of all cow's milk proteins first. It's non-invasive and potentially very helpful. If formula feeding, that means using an elemental formula (like Neocate or Elecare) for several weeks to see if it clears up the wheezing and other symptoms. If breastfeeding, that means MOM needs to remove all cow's milk proteins from her diet (that means reading labels, and knowing what names to look for) - here's a wonderful cheat sheet:
http://www.kellymom.com/store/freehandouts/hidden-dairy01...
Another helpful resource - Tracking Down Allergies:
http://askdrsears.com/html/4/T041800.asp
Also, it's important to know that babies who react to cow's milk are also likely to react to soy proteins - so when doing the elimination, it's worthwhile to use the elemental formula instead of a soy-based formula. If the elemental formula reduces or eliminates your baby's symptoms, then do a test w/ a soy formula to see how baby does on it - if the symptoms like wheezing, congestion, discomfort stay away, then soy formula might be an option.
Anyway... just another possible cause to consider.
A few links for you - these are the sites of 2 non-dairy, non-soy formulas:
http://neocate.com/aaa_neocate/1128-neocate-home-page.html
http://elecare.com/hcp/
This last link is great - while it is specifically for breastfeeding moms, don't miss the information b/c it's great for formula fed babies too!:
http://www.kellymom.com/babyconcerns/food-sensitivity.html
Hope this helps, and that your baby finds relief soon (and you, too, because it's never easy to watch your baby suffer)!