If \( a \pm bi \) (\( b \neq 0 \)) are imaginary roots of the equation \( x^3 + qx + r = 0 \), where \( a \), \( b \), \( q \), and \( r \) are real numbers, find \( q \) in terms of \( a \) and \( b \). The original answer is in the form \( kb^2 - ma^2 \). Please calculate the value of k + m.

Let's think step by step and output the final answer within \boxed{}.
user