(7) Let the function $f: \mathbf{R} \rightarrow \mathbf{R}$, satisfy $f(0)=1$, and for any $x, y \in \mathbf{R}$, we have
$$
f(x y+1)=f(x) f(y)-f(y)-x+2,
$$

then $f(x)=$ $\qquad$
(7) $x+1$ Hint: Since for any $x, y \in \mathbf{R}$ we have
$$
f(x y+1)=f(x) f(y)-f(y)-x+2 \text {, }
$$

we also have
$$
f(x y+1)=f(y) f(x)-f(x)-y+2,
$$

Subtracting the above two equations yields
$$
f(x)+y=f(y)+x .
$$

Setting $y=0$ gives $f(x)=x+1$.