Given: \(q_A = +2.5\times10^{-7}\,\text{C}\) at \(A:(0,0,-15\,\text{cm})\) and \(q_B = -2.5\times10^{-7}\,\text{C}\) at \(B:(0,0,+15\,\text{cm})\).
Step 1: Total charge (part a). The total charge is the algebraic sum:
\[ q_{\text{total}} = q_A + q_B = (+2.5\times10^{-7}) + (-2.5\times10^{-7}) \]
\[ q_{\text{total}} = 0. \]
Step 2: Set up the dipole (part b). The two charges are equal and opposite, so they form an electric dipole. The magnitude of the dipole moment is
\[ p = q\times(2a), \]
where \(q\) is the magnitude of either charge and \(2a\) is the separation between them.
Step 3: Separation. A is at \(z = -15\,\text{cm}\) and B is at \(z = +15\,\text{cm}\), so
\[ 2a = 30\,\text{cm} = 0.30\,\text{m}. \]
Step 4: Magnitude of dipole moment.
\[ p = (2.5\times10^{-7})(0.30) \]
\[ p = 7.5\times10^{-8}\,\text{C m}. \]
Step 5: Direction. By convention the dipole moment points from the negative charge to the positive charge. Here \(+q\) (A) is at \(z=-15\,\text{cm}\) and \(-q\) (B) is at \(z=+15\,\text{cm}\), so \(\vec p\) points along the \(-z\) direction.
\[\boxed{q_{\text{total}} = 0, \quad p = 7.5\times10^{-8}\,\text{C m along } -z}\]
Expert method: dipole moment as a coordinate sum \(\vec p = \sum q_i \vec r_i\).
Step 1: The dipole moment of any charge distribution about an origin is \(\vec p = \sum_i q_i\,\vec r_i\). When the total charge is zero this sum is independent of the choice of origin, so the answer is unambiguous.
Step 2 (total charge): \(\sum q_i = (+2.5\times10^{-7}) + (-2.5\times10^{-7}) = 0\). Good, so the dipole moment will be origin-independent.
Step 3 (position vectors): In metres, \(\vec r_A = (0,0,-0.15)\) for \(q_A = +2.5\times10^{-7}\,\text{C}\), and \(\vec r_B = (0,0,+0.15)\) for \(q_B = -2.5\times10^{-7}\,\text{C}\).
Step 4 (vector sum):
\[ \vec p = q_A\vec r_A + q_B\vec r_B. \]
\[ \vec p = (2.5\times10^{-7})(0,0,-0.15) + (-2.5\times10^{-7})(0,0,+0.15). \]
The z-component is
\[ p_z = (2.5\times10^{-7})(-0.15) + (-2.5\times10^{-7})(0.15) = -3.75\times10^{-8} - 3.75\times10^{-8} = -7.5\times10^{-8}. \]
Step 5: Hence \(\vec p = (0,0,-7.5\times10^{-8})\,\text{C m}\). Its magnitude is \(7.5\times10^{-8}\,\text{C m}\) and it points along \(-z\), confirming the textbook result and showing directly (negative \(p_z\)) that the moment heads from the negative charge to the positive charge.
\[\boxed{q_{\text{total}} = 0, \quad \vec p = -7.5\times10^{-8}\,\hat k\ \text{C m}}\]