because
[tex]df=\frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy[/tex]
and
[tex]\frac{\partial}{\partial x}(\frac{y}{x})=\frac{-y}{x^2}[/tex]
and
[tex]\frac{\partial}{\partial y}(\frac{y}{x})=\frac{1}{x}[/tex]
no it isn't, it's a definition. if you don't know what the definitions are then of course it will seem hard, but this is exactly what the notation means.
Yes, it is clear that [tex]d\frac{y}{x}= -\frac{y}{x^2}dx+ \frac{1}{x}dx[/tex] because [tex]\frac{d(\frac{a}{x})}{dx}= -\frac{a}{x^2}[/tex] for any constant a and [tex]\frac{d(\frac{y}{a})}{dy}= \frac{1}{a}[/tex] for any constant a.
But how would you go from [tex]-\frac{y}{x^2}dx+ \frac{1}{x}dx[/tex] to [tex]d{(\frac{y}{x})}[/tex]? That, I think, is the question being asked and I'll bet it's in your textbook: look under "exact differentials" or "integrals independent of path". (Actually, going that direction gives a more general answer- you have a "constant of integration".)
You know that [tex]dF(x,y)= \frac{\partial F}{\partial x}dx+ \frac{\partial F}{\partial y} dy[/tex]. So whatever F is, if [tex]dF= -\frac{y}{x^2}dx+ \frac{1}{x}dx[/tex] then we must have [tex]\frac{\partial F}{\partial x}= -\frac{y}{x^2}[/tex] and [tex]\frac{\partial F}{\partial y}= \frac{1}{x}[/tex].
In particular, taking the anti-derivative of [tex]\frac{\partial F}{\partial x}= -\frac{y}{x^2}[/tex] , we have (remembering that the partial derivative treats y like a constant), [tex]F(x,y)= \frac{y}{x}+ g(y)[/tex] because the anti-derivative of [tex]\frac{a}{x^2}= ax^{-2}[/tex] is -ax^{-1} and here a is -y. Notice that g(y)! That's the "constant" of integration- no matter what function of y g is, taking the partial derivative with respect to x is 0.
Now, differentiate that with respect to y: [tex]\frac{\partial \frac{y}{x}+ g(y)}{\partial y}= \frac{1}{x}+ g'(y)[/tex] (Since g is a function of y only, the derivative of g is an ordinary derivative). Now compare that with [tex]\frac{\partial F}{\partial y}= \frac{1}{x}[/tex]. We must have [tex]\frac{1}{x}+ g'(y)= \frac{1}{x}[/tex] which just tells us that g'(y)= 0 so g(y) really is a constant!
[tex]F(x,y)= \frac{y}{x}+ C[/tex] or [tex]d(\frac{y}{x}+C)= -\frac{y}{x^2}dx+ \frac{1}{x}dx[/tex]. Of course, your example is taking C= 0.