Let $X,Y$ be varieties. Show that the pullback map $\phi^{*}\colon O(Y)\rightarrow O(Y)$ of $\phi\colon X\rightarrow Y$, induces the map $\phi^{*}_P\colon O_{P,X}\rightarrow O_{\phi(P),Y}$ of local rings.
I find this problem deceptively simple, but I cannot come up with a proof. I know that $O(X)$ and $O(Y)$ are both embedded in $O_{P,X}$ and $O_{\phi(P),Y}$ respectively.
I was thinking maybe just simply taking a point $P\in X$, and showing that it maps to $\phi(P)$, and then taking local rings? Maybe show $\phi^{*}_P$ pulls back regular functions to regular functions, and show that this is the same map as $\phi^{*}$?
I hope I made the problem clear. It seems quite obvious, but I cannot find a rigorous proof.