Math Genius: Show that \$phi^{-1}((y_1-a_1,ldots,y_n-a_n))=(x_1-b_1,ldots,x_m-b_m)\$ for points in affine varieties \$psi((a_1,ldots,a_n))=(b_1,ldots,b_m)\$

Let $$A=k[x_1,ldots,x_m]$$ and $$B=k[y_1,ldots,y_n]$$ over some algebraically closed field $$k$$. Let $$psi : mathbb{A}^nrightarrow mathbb{A}^m$$ be the morphism corresponding to a $$k$$-algebra homomorphism $$phi: Arightarrow B$$. Let $$a=(a_1,ldots,a_n)in mathbb{A}^n$$ and $$psi(a)=(b_1,ldots,b_m)inmathbb{A}^m$$. I want to show that $$phi^{-1}((y_1-a_1,ldots,y_n-a_n))=(x_1-b_1,ldots,x_m-b_m)$$.
I know that since $$phi$$ is a $$k$$-algebra homomorphism and $$A$$ and $$B$$ are finitely generated $$k$$-algebra, then the preimage of a maximal ideal is again a maximal ideal. I also know that by Hilberts Nullstellensatz, then a point $$(a_1,ldots,a_n)$$ in a affine variety corresponds to the maximal ideal $$(a_1-p_1,ldots,x_n-a_n)$$. And by how $$psi$$ is defined on the point $$a$$, then this seems to be natural that $$phi^{-1}((y_1-a_1,ldots,y_n-a_n))=(x_1-b_1,ldots,x_m-b_m)$$. However I was wondering if there were a more rigorously way of doing it or seeing it. My argument seems a little loose.
A $$k$$-point in $$Bbb A^n$$ is the same as a map from $$Bbb A^0to Bbb A^n$$ picking out the point we care about. On the coordinate algebra side, this is represented by the map $$k[y_1,cdots,y_n]to k$$ given by $$y_imapsto a_i$$, and the preimage of the maximal ideal $$(0)subset k$$ is exactly the maximal ideal $$(y_1-a_1,cdots,y_n-a_n)$$.
Composing this with our map $$Bbb A^nto Bbb A^m$$, we get a map $$Bbb A^0to Bbb A^m$$ which corresponds to $$k[x_1,cdots,x_m]to k$$. The map $$Bbb A^0to Bbb A^m$$ picks out $$(b_1,cdots,b_m)$$, so we have that our map on coordinate rings $$k[x_1,cdots,x_m]to k$$ is given by $$x_jmapsto b_j$$, and the preimage of the maximal ideal $$(0)subset k$$ is exactly the maximal $$(x_1-b_1,cdots,x_m-b_m)$$.
Now look at the sequence of maps $$k[x_1,cdots,x_m]to k[y_1,cdots,y_n]to k$$. The preimage of $$(0)$$ along the first map is $$(y_1-a_1,cdots,y_n-a_n)$$, and the preimage of $$(0)$$ along the composite is $$(x_1-b_1,cdots,x_m-b_m)$$. But this means that the preimage of $$(y_1-a_1,cdots,y_n-a_n)$$ is $$(x_1-b_1,cdots,x_m-b_m)$$ by, for instance, the second-to-last line of this answer.