Pain when taking deep breath 5th rib on right side below armpit and pain goes to back by spine along ribs. Doctor said it is muscular 3 months ago?

Reevaluation. If it has been going on for three months and not resolved, it suggests there is something more going on and you would be wise to be reevaluated.