Both of those medications are known to cause Small Intestinal Bacterial Overgrowth as well as Candida overgrowth. Heartburn and indigestion are caused by to little stomach acid which leads to protein and fats not be digested adequately and putrefying in the small intestine for to long which causes fermentation to happen in your upper gi tract causing the indigestion/burning.
You should immediately discontinue those medications and be aware that your stomach acid will probably continue to be low for some time as a result of those medications causing deficiencies in nutrients needed for stomach acid production like vitamin b12 which requires a lot of stomach acid to be properly absorbed.
Since your stomach acid will be low you should take 1-2 table spoons of apple cider vinegar in a glass of water with all meals. You could also use Swedish bitters or both of these things to improve digestion.
When you have an overgrowth like this it can often be difficult to digest fructose, and I would try to eat the kinds of starches, vegetables and fruits that are primarily glucose based as they are digested very early on in your gi tract and should not cause problems with fermentation. Examples of these would be potatoes, white rice, and cranberry.