<s>[INST] Let $f(xy) = f(x)+ f(y) +\frac{x+y-1}{xy} \forall x,y>0$, $f'(1)=2$, $f$ is differentiable . Find $f(x)$. What I have gotten from $f(xy) = f(x)+ f(y) +\frac{x+y-1}{xy}$ is:

*

*$f(1)=-1$
2.$f(x)+f(\frac{1}{x}) =-(x+\frac{1}{x})$
The information I could get from $f'(1)=2$ is just:
$\lim_{h\to 0} { \frac{f(1+h)+1}{h}}=2$
Since the limit is given, my approach was to find $f'(x)$ and then solve the differential equation. But I'm unable to compute the limit $\lim_{h \to 0} {\frac{f(x+h)-f(x)}{h}}$ with the information given. I have tried stuff like converting $f(x)$ to $f(\frac{x}{h}\cdot h)$ and try to use the original equation and convert it into$ f(\frac{x}{h})+ f(h) +\frac{\frac{x}{h}+h-1}{x}$.But it hasn't been of any use to compute the limit. I need to do it in the way of computing the limit and solving the Differential equation.
 [/INST] Here is an answer along the lines requested by OP by taking a limit.
I assume the domain is $x > 0 $
I use an alternate, but equivalent, definition of the derivative involving a product to make use of the given property.  It is valid since $xh \to x$ as $h \to 1$.
$$
\begin{align*}
f'(x) &= \lim_{h \to 1} \frac{f(xh) - f(x)}{xh-x}\\
      &= \lim_{h \to 1} \frac{f(x)+f(h) + \frac{x+h-1}{xh} - f(x)}{x(h-1)}\\
      &= \lim_{h \to 1} \frac{f(h) + \frac{x+h-1}{xh}}{x(h-1)}\\
      &= \lim_{h \to 1} \frac{f(h) - f(1) + f(1) +  \frac{x+h-1}{xh}}{x(h-1)}\\
      &= \lim_{h \to 1} \frac{1}{x}\frac{f(h) - f(1)}{h-1} + \frac{-1+ \frac{x+h-1}{xh}}{x(h-1)} \textrm{ since $f(1) = -1$}\\
      &= \frac{1}{x} f'(1) + \lim_{h \to 1} \frac{x+h-xh-1}{x^2h(h-1)}\\
      &= \frac{2}{x}  + \lim_{h \to 1} \frac{(1-x)(h-1)}{x^2h(h-1)}\\
      &= \frac{2}{x} +  \lim_{h \to 1} \frac{(1-x)}{x^2h}\\
      &= \frac{2}{x} +  \frac{1}{x^2} - \frac{1}{x}\\
      &= \frac{1}{x} + \frac{1}{x^2}
\end{align*}
$$
Hence $f'(x) = x^{-1} + x^{-2}$, so $f(x) = \ln(x) - \frac{1}{x} + C$
Now using $f(1) = -1 $ we obtained $C=0$.
</s>