Ionic equilibrium calculations: A problem solving approach