the important thing : the expression has to be larger than 0 for all real x (that means for all values, the whole graph of the function has to be above the x-axis).
that is only possible, if the function has NO real zero solution (there are no x-axis interceptions). the only zero solutions are complex/imaginary numbers.
in other words, we need to find all k that would give the function only complex zero solutions.
kx² + 3kx + 9 > 0
the solution to a quadratic equation
ax² + bx + c = 0
is
x = (-b ± sqrt(b² - 4ac))/(2a)
in our case
x = (-3k ± sqrt((3k)² - 4×k×9))/(2k) =
= (-3k ± sqrt(9k² - 36k))/2k
to have real x as solution the discriminat (the content of the square root function) must be >= 0.
to create complex numbers as solutions, this discriminant must be therefore < 0 (as a square root of a negative number is a complex number).
9k² - 36k < 0
k² - 4k < 0
to find the interval limits, we can look for the "= 0" solutions, which are then not included in the actual solution (due to the "< 0" condition).
like above
k = (4 ± sqrt((-4)² - 4×1×0))/(2×1) =
= (4 ± sqrt(16))/2 = (4 ± 4)/2
k1 = (4 + 4)/2 = 8/2 = 4
k2 = (4 - 4)/2 = 0
and so we see
0 < k < 4
FYI : we could also continue from
k² - 4k < 0
to find the "= 0" solutions by
k² - 4k = 0
k(k - 4) = 0
k = 0 and k = 4
giving us again
0 < k < 4