Step 1: Formula First
For $\tan\left(\dfrac xy\right)$: $d\left[\tan\dfrac xy\right]=\sec^{2}\left(\dfrac xy\right)\dfrac{y\,dx-x\,dy}{y^{2}}$.
Step 2: Rearrange the Equation
The given equation is $\sec^{2}\left(\dfrac xy\right)(y\,dx-x\,dy)+y\,dy=0$.
Step 3: Divide by y Squared
$\sec^{2}\left(\dfrac xy\right)\dfrac{y\,dx-x\,dy}{y^{2}}+\dfrac{dy}{y}=0$, which is $d\left[\tan\dfrac xy\right]+d\left[\log|y|\right]=0$.
Step 4: Conclude
Integrating gives $\tan\left(\dfrac xy\right)+\log|y|=c$, so $g(y)=\log|y|$.
Final Answer:
Matching the differential gives g of y equal to log of the modulus of y.
\[ \boxed{\text{(A) }\log|y|} \]