Yes, these are good medicines for your gastric complaints.
I think your doctor has prescribed these medicines on basis of your symptoms so have faith in your doctor.
This bacteria is very strong bacteria so this should be cured timely, if it remains in your stomach then it may cause serious issues.
Next Steps
If you will not feel any improvement then you can freely consult me through practo app.
Health Tips
Try to avoid taking dairy products.
Eat short frequent meals.
Avoid eating unhygienic food/street food.
Wash your hands properly.
Try to wash fruits & vegetables properly with warm water.