I rewrote q(p) as q p (q times p): Not sure whether this is what you meant.
6 p' + 24 q p = 16
divide both sides by 6
p' + 4 q p = 8/3 ---------(1)
Linear equation of first order
Integrating factor e^∫4q dq = e^(2q^2)
Multiply equation (1) by the integrating factor e^(2q^2)
e^(2q^2) p' + 4 q p e^(2q^2) = (8/3) e^(2q^2) ---------(2)
The left side of (2) is d/dq ( p times the integraing factor) or
(p e^(2q^2) )'
(p e^(2q^2))' = (8/3) e^(2q^2)
∫(p e^(2q^2))' dq = (8/3)∫ e^(2q^2) dq + C
p e^(2q^2) = (8/3)∫ e^(2q^2) dq + C
p = (8/3) ∫e^(2q^2) dq / e^(2q^2) + C / e^(2q^2)---- answer
∫e^(2q^2) dq = sqrt (2 pi) erfi (sqrt(2) x)
http://www.wolframalpha.com/input/?i=erfi
I'm not sure of this solution as I cannot distinguish between q(p) and qp