4. In the same Cartesian coordinate system, it is known that the line $y=k x$ intersects the graph of the function
$$
y=\left\{\begin{array}{ll}
2 x+4, & x<3 \\
x+7, & x \geq 3
\end{array}\right.
$$

at exactly three different points. Determine the range of values for $k$.
4. $\left(\frac{2}{3}, 2\right)$.

Draw a rough sketch of the function in the coordinate system, i.e., the thick black broken line in Fig. 4.

The line $l_{1}$: $y=2 x$ intersects the broken line at only one point;

The line $l_{2}$: $y=\frac{2}{3} x$ intersects the broken line at only two points.