So I am trying to show the following: $$\sum_{n \leq x} \frac{\mu(n)}{n} \log{\frac{x}{n}}=O(1) $$ so I tried partial summation as following:
Let $A(x)=\sum_{n \leq x} \frac{\mu(n)}{n}$, then we have $$\sum_{n \leq x} \frac{\mu(n)}{n} \log{\frac{x}{n}}= \int_1^{x} \frac{A(t)\mathrm dt}{t},$$ and $A(t)$ is clearly very small, or $o(1)$ for all $t \in [1,x]$. My question is how to go from here to conclude that the error term is $O(1)$?
As you mentioned, we have $$\sum_{n\leq x}\frac{\mu(n)}{n} \log\frac{x}{n}=\int_1^x \left(\sum_{m\leq t}\frac{\mu(m)}{m}\right) \frac{dt}{t}.$$
You need a particular bound on the inner sum. For instance, since $\sum_{m\leq t}\frac{\mu(m)}{m}\ll (\log t)^{-2}$, the result follows.
Here is cool trick however. Notice that $$\sum_{nd\leq x}\frac{\mu(n)}{nd}=\sum_{k\leq x}\frac{1}{k}\sum_{d|k}\mu(d)=1.$$ Now, write the first sum as $$\sum_{n\leq x}\frac{\mu(n)}{n}\sum_{k\leq\frac{x}{n}}\frac{1}{k}=\sum_{n\leq x}\frac{\mu(n)}{n}\left(\log\left(\frac{x}{n}\right)+\gamma+O\left(\frac{n}{x}\right)\right).$$