I was studying the Prime Number Theorem, which says $\lim_{x\to \infty} \frac{\prod(x)}{\frac{x}{\ln x}} = 1$, where $\prod(x) =$ number of primes $\leq x$. But the Wikipedia results for $\prod(x) - \frac{x}{\ln x}$ do not seem to tend to $0$ as $x\to \infty$.
So my doubt, in general is that if $\lim_{x\to a}\frac{f(x)}{g(x)} = 1$, then it seems to be true that $\lim_{x\to a} f(x)-g(x) = 0$. Please give some insight as to why this is true or not. Does $a = \infty$ change the result?
The fact that the limit of the ratio is $1$ basically says nothing about the behaviour of the difference. We illustrate with limits as $x\to \infty$. Similar illustrations can be made with limits as $x\to a$, where $a$ is arbitrary.
$1$.) Let $f(x)=x^2+17$ and let $g(x)=x^2+1$. Then $\lim_{x\to\infty}\frac{f(x)}{g(x)}=1$ but $\lim_{x\to\infty} (f(x)-g(x))=16$.
$2$.) Let $f(x)=x^2+x+1$ and $g(x)=x^2+1$. The limit of the ratio is $1$, but the limit of the difference does not exist, or if you prefer is $\infty$.
$3$.) Let $f(x)=x^2-\sin x$ and $g(x)=x^2+1$. Again the limit of the ratio is $1$, but the difference oscillates.