Step 1: Set up the equation as before.
Let the stream speed be $x$ km/h. Upstream speed $=12-x$, downstream speed $=12+x$. \[ \frac{15}{12-x} + \frac{18}{12+x} = 3 \]
Step 2: Simplify to a quadratic. \[ \frac{5}{12-x}+\frac{6}{12+x}=1 \] \[ \frac{5(12+x)+6(12-x)}{144-x^2}=1 \] \[ 132-x = 144-x^2 \] \[ x^2 - x - 12 = 0 \]
Step 3: Solve using the quadratic formula instead of factorisation. \[ x = \frac{-(-1) \pm \sqrt{(-1)^2 - 4(1)(-12)}}{2(1)} = \frac{1 \pm \sqrt{1+48}}{2} = \frac{1 \pm 7}{2} \] This gives $x = 4$ or $x = -3$.
Step 4: Reject the invalid root.
Speed cannot be negative, so $x = -3$ is rejected, leaving $x=4$.
\[ \boxed{\text{Speed of stream} = 4\text{ km/h}} \]