4. For any positive real numbers $x, y$,
$$
\frac{(x y+x+y)(x+y+1)}{(x+y)(x+1)(y+1)}
$$

the range of values is
4. $\left(1, \frac{9}{8}\right]$.

Let $f(x, y)=\frac{(x y+x+y)(x+y+1)}{(x+y)(x+1)(y+1)}$. Then $f(x, y)=1+\frac{x y}{(x+y)(x+1)(y+1)}>1$.
When fixing $y$, and $x \rightarrow 0$, $f(x, y) \rightarrow 1$.
By the AM-GM inequality,
$x+y \geqslant 2 \sqrt{x y}, x+1 \geqslant 2 \sqrt{x}, y+1 \geqslant 2 \sqrt{y}$.
Then $f(x, y) \leqslant 1+\frac{x y}{2 \sqrt{x y} \cdot 2 \sqrt{x} \cdot 2 \sqrt{y}}=\frac{9}{8}$,
and when $x=y=1$, the equality holds.
Therefore, the range of $f(x, y)$ is $\left(1, \frac{9}{8}\right]$.