Special products and factoring

Given that x+y+xy=1, where x and y are nonzero real numbers, find the value of xy+1/xy-y/x-x/y.

Thus,
xy+1/xy-y/x-x/y
= [xy+xy]*[1+1]/xy
=2xy*2/xy
4xy
/xy
=4.

Question:
How did it became [xy+xy]*[1+1]/xy?

First of all, thank you for posting this problem in our forum. I found it very interesting. I cannot trace how it became $\dfrac{(xy + xy)(1 + 1)}{xy}$. I think there are several steps that are not shown before it came to that line, or it is just me. I arrive at the same answer though, the key to my solution is that $1 = 1^2$. Because $x + y + xy = 1$, then we can say that $x + y + xy = (x + y + xy)^2$.
 

Given that $x + y + xy = 1$, where $x$ and $y$ are nonzero real numbers, find the value of $xy + \dfrac{1}{xy} - \dfrac{y}{x} - \dfrac{x}{y}$

 

$\begin{align}
xy + \dfrac{1}{xy} - \dfrac{y}{x} - \dfrac{x}{y} & = xy + \dfrac{1 - y^2 - x^2}{xy} \\
& = xy + \dfrac{1^2 - y^2 - x^2}{xy} \\
& = xy + \dfrac{(x + y + xy)^2 - y^2 - x^2}{xy} \\
& = xy + \dfrac{(x^2 + y^2 + x^2y^2 + 2xy + 2x^2 y + 2xy^2) - y^2 - x^2}{xy} \\
& = xy + \dfrac{x^2y^2 + 2xy + 2x^2 y + 2xy^2}{xy} \\
& = xy + \dfrac{xy(xy + 2 + 2x + 2y)}{xy} \\
& = xy + (xy + 2 + 2x + 2y) \\
& = 2xy + 2 + 2x + 2y \\
& = 2(x + y + xy) + 2 \\
& = 2(1) + 2 \\
& = 4 \\
\end{align}$
 

For the expansion of $(x + y + xy)^2$, we use the trinomial expansion $(a + b + c)^2 = a^2 + b^2 + c^2 + 2ab + 2bc + 2ac$.
 

I know, I was not able to answer your question directly, but I hope my reply gave you some light from a different angle.