$xy + \dfrac{1}{xy} - \dfrac{y}{x} - \dfrac{x}{y}$
$= \dfrac{x^2y^2 + 1 - y^2 - x^2}{xy}$
$= \dfrac{(x^2y^2 - y^2) - (x^2 - 1)}{xy}$
$= \dfrac{y^2(x^2 - 1) - (x^2 - 1)}{xy}$
$= \dfrac{(x^2 - 1)(y^2 - 1)}{xy}$
$= \dfrac{(x - 1)(x + 1)(y - 1)(y + 1)}{xy}$
$= \dfrac{(x - 1)(y - 1) \times (x + 1)(y + 1)}{xy}$
$= \dfrac{(xy - x - y + 1) \times (xy + x + y + 1)}{xy}$
$= \dfrac{[ \, xy + (1 - x - y) \, ] \times [ \, (x + y + xy) + 1 \, ]}{xy}$
From the given:
$x + y + xy = 1$ and
$1 - x - y = xy$
Thus,
$xy + \dfrac{1}{xy} - \dfrac{y}{x} - \dfrac{x}{y}$
$= \dfrac{[ \, xy + xy \, ] \times [ \, 1 + 1 \, ]}{xy}$
$= \dfrac{2xy \times 2}{xy}$
$= \dfrac{4xy}{xy}$
$= 4$ answer