Hi I'm having right side pain under rib cage and lower back pain that is releaved when I have a bowl movement. I'm also have nausea.

Start with water. Try to increase water intake and maybe also fiber intake to get a more even consistency to your stool. If having regular bowel movements results in minimization of the discomfort then this was the problem. If symptoms persist then you probably need to see your doctor in order to evaluate for other things like gallbladder problems.