Step 1: Rewrite the given differential equation.
\[
y(1+xy)\,dx - x\,dy = 0
\]
Rearranging,
\[
x\,dy = y(1+xy)\,dx
\]
\[
\Rightarrow \frac{dy}{dx} = \frac{y(1+xy)}{x}
\]
Step 2: Check if the equation is homogeneous.
\[
\frac{dy}{dx} = \frac{y}{x} + y^2
\]
Let
\[
y = vx \Rightarrow \frac{dy}{dx} = v + x\frac{dv}{dx}
\]
Step 3: Substitute \(y=vx\) into the equation.
\[
v + x\frac{dv}{dx} = v + v^2x^2
\]
\[
x\frac{dv}{dx} = v^2x^2
\]
\[
\frac{dv}{v^2} = x\,dx
\]
Step 4: Integrate both sides.
\[
\int v^{-2}\,dv = \int x\,dx
\]
\[
-\frac{1}{v} = \frac{x^2}{2} + C
\]
Step 5: Substitute back \(v=\dfrac{y}{x}\).
\[
-\frac{x}{y} = \frac{x^2}{2} + C
\]
\[
\Rightarrow \frac{x}{y} = -\frac{x^2}{2} + C'
\]
Step 6: Use the given point \((1,2)\).
\[
\frac{1}{2} = -\frac{1}{2} + C'
\Rightarrow C' = 1
\]
Step 7: Write the final equation.
\[
\frac{x}{y} = 1 - \frac{x^2}{2}
\]
\[
y = \frac{x}{1-\frac{x^2}{2}}
= \frac{2x}{2-x^2}
\]
Hence,
\[
\boxed{f(x)=\dfrac{2x}{2-x^2}}
\]