How to justify this limit? If I have known $y$ as function of $x$ that as $x\rightarrow 0^+$,$y\sqrt x\rightarrow1$, then given a continuous function $f$ defined on $R^2$. Under what condition can we state:
$$lim_{x\rightarrow 0^+}f(x,y(x))=lim_{x\rightarrow 0^+}f(x,1/\sqrt x)?$$
An example is $f(x,y):=x y$, then as $x$ is approaching to zero, $$lim_{x\rightarrow 0^+}f(x,y(x))=lim_{x\rightarrow 0^+}xy(x)=0=lim_{x\rightarrow 0^+}x\sqrt {1/x}.$$
But is it true for any continuous function $f$ defined on $R^2$?If it is not true for all continuous functions, what condition should be satisfied to make this true?

Edit: The first answer below shows the use of composition laws. However this law seems not useful in our problem since $y(x)$ should be approaching to infinity instead of approaching to a real $a$. 

This problem could be recasted in the following form: given a continuous $f$ on $R^2$ and a function $p(x)$ which is approaching to $1$ as $x\rightarrow 0^+$, then if $lim_{x\rightarrow 0^+}f(x,\sqrt {1/x})$ exists and then would $lim_{x\rightarrow 0^+}f(x,p(x) \sqrt{1/x}) $ exist and are they equal?
 A: Let's formalize the question as:

Let $f$ be a continuous function and let $g$ be any function such that $\lim_{x\rightarrow a}g(x) = \infty$. Suppose $\lim_{x\rightarrow a}f(g(x)) = b$ and for some function $p(x)$, we have $\lim_{x\rightarrow a}p(x) = 1$. Under what circumstances does $\lim_{x\rightarrow a}f(p(x)g(x))$ exist, and in particular, when does it equal $b$?



*

*If $\lim_{x\rightarrow a}g(x)$ were finite, then the result follows from the composition and product laws for limits. 

*If $g$ is continuous, then the result follows. Indeed, $g$ takes on every value larger than some threshold value $L$ while in the vicinity of $x=a$.  In other words, if $y_n$ is any sequence which grows without limit, then we can find a sequence $x_n\rightarrow a$ such that for all but finitely many terms of the sequence, $g(x_n) = y_n$ and for such points, $y_i \leq y_j$ implies that $x_i \leq x_j \leq a$. It follows that $f(y_n)$ and $f(g(x_n))$ have the same limit, which must be $b$ because $\lim_{x\rightarrow a}f(g(x)) = b$.
In particular, pick any $u_n\rightarrow a$ and define $y_n \equiv p(u_n)\cdot g(u_n)$.  Then $y_n$ grows without limit, and we can find an increasing sequence $x_n\uparrow a$ such that $y_n = g(x_n)$ for all but finitely many terms, so the limit of $f(y_n)=f(p(u_n)\cdot g(u_n))$ is the limit of $f(g(x_n))$, namely $b$. Because this is true for any sequence $u_n\rightarrow a$, it establishes $\lim_{x\rightarrow a}f(p(x)\cdot g(x)) = b$.

*If $g$ is not continuous, then the result does not necessarily follow. For  example, take a continuous function $f(x) = x\sin{(2\pi x)}$, and take $g(x) = \lfloor 1/x^2 \rfloor$. Then $\lim_{x\rightarrow 0}g(x) = \infty$ as required. Moreover, $(f\circ g) = 0$ because $f$ is zero on integer values. Hence $\lim_{x\rightarrow 0}f(g(x)) = 0$.
But we can find a function like $p(x) = \frac{\lfloor 1/x^2\rfloor + 0.25}{\lfloor 1/x^2 \rfloor}$ which approaches 1 slowly enough that $f(p(x)g(x))$ approaches a value much different from $f(g(x))$: we have that $\lim_{x\rightarrow 0}p(x) = 1$. But $p(x)g(x) = \lfloor 1/x^2\rfloor + 0.25$. Hence $f(p(x)g(x)) = (\lfloor 1/ x^2 \rfloor + 0.25) \cdot \sin(2\pi \lfloor 1/x^2\rfloor + \pi/2) = (\lfloor 1/x^2 \rfloor + 0.25)$. Hence $\lim_{x\rightarrow 0} f(p(x)g(x)) = \infty \neq \lim_{x\rightarrow 0} f(g(x)) = 0$.
The problem is apparently that, because $g$ is not continuous in the region of interest, we can choose $p(x)$ so that $p(x)g(x)$ takes on values that $g(x)$ never takes, even if $p(x)\rightarrow 1$. As a result, we can perversely choose $f(x)$ so that $f(p(x)g(x))$ consists of a different set of values and approaches a different limit than $f(g(x))$.
