New version of the answer
I'll leave below the old version of the answer so that the comments remain understandable. Thank you to the commenters.
Let me prove a slightly more general statement:
(I) If $(X_i)_{i\in I}$ is a family of indeterminates, then we have a natural $A$-algebra isomorphism
$$
A\left[(X_i)_{i\in I}\right]\simeq\bigotimes_{i\in I}A[X_i].
$$
Here and in the sequel, tensor products are taken over $A$.
Let $B$ and $C$ be the left and right hand side of the above display, and recall that the coproduct of a family $(A_i)_{i\in I}$ of $A$-algebras is their tensor product. Also note:
(II) For any $A$-algebra $D$ and any family $(d_i)_{i\in I}$ a family of elements of $D$, there is a unique $A$-algebra morphism from $B$ to $D$ mapping $X_i$ to $d_i$ for all $i$.
(III) For any $A$-algebra $D$ and any family $(d_i)_{i\in I}$ a family of elements of $D$, there is a unique $A$-algebra morphism from $C$ to $D$ mapping
$$
x_i:=X_i\otimes\bigotimes_{j\neq i}1
$$
to $d_i$ for all $i$.
Proof of (I): By (II) and (III) the $A$-algebra morphism from $B$ to $C$ mapping $X_i$ to $x_i$ for all $i$ and the $A$-algebra morphism from $C$ to $B$ mapping $x_i$ to $X_i$ for all $i$ are inverse isomorphisms.
Additional remarks.
$\bullet$ Inductive limits of $A$-algebras exist. In the terminology of
Categories and Sheaves by Kashiwara and Schapira (Springer 2006), Google preview, Amazon preview,
we have: Let $\mathcal U$ be a universe, let $\mathcal A$ be the category of $A$-algebras whose underlying set belongs to $\mathcal U$, let $I$ be a small category, and let $\alpha:I\to\mathcal A$ be a functor. Then the inductive limit of $\alpha$ exists in $\mathcal A$.
$\bullet$ If $(M_i)_{i\in I}$ is a family of $A$-modules, the the tensor product $\bigotimes_{i\in I}M_i$ is well defined, and satisfies the usual universal property.
Old version of the answer
$A[X,Y]$ and $A[X]\otimes_AA[Y]$ can viewed be
as rings, as $A$-algebras, as $A$-modules, as $A[X]$-algebras, as $A[X]$-modules, as $A[Y]$-algebras, as $A[Y]$-modules, and in many others ways. I'll view them as $A$-algebras. Then the natural isomorphism $A[X,Y]\simeq A[X]\otimes_AA[Y]$ is an immediate consequence of the following two more general facts.
If $B$ and $C$ are $A$-algebras, let me denote by $\mathcal A(B,C)$ the set of $A$-algebra morphisms from $B$ to $C$.
Fact $1$. If $B,C,D$ are $A$-algebras, then $B\otimes_AC$ is the coproduct of $B$ and $C$, that is, we have a canonical bijection
$$
\mathcal A(B\otimes_AC,D)\simeq\mathcal A(B,D)\times\mathcal A(C,D).
$$
Fact $2$. If $(X_i)_{i\in I}$ is a family of indeterminates, then $A\left[(X_i)_{i\in I}\right]$ is free over $I$, that is we have a canonical bijection
$$
\mathcal A\left(A\left[(X_i)_{i\in I}\right],D\right)\simeq D^I,
$$
where $D^I$ is the set of maps from $I$ to $D$.
EDIT A. This is to answer Marc's comment. Let $f:B\to C$ be an $A$-algebra morphism. For any $A$-algebra $D$ let
$$
f_D:\mathcal A(C,D)\to\mathcal A(B,D)
$$
be the induced map. Assume that $(1)$ $f_B$ is surjective and $(2)$ $f_C$ injective. Then, by $(1)$, there is a $g:C\to B$ such that $g\circ f=\text{id}_B$, and $(2)$ implies $f\circ g=\text{id}_C$. (This is a general trick.)
EDIT B. To complete the argument, one needs a morphism between $A[X,Y]$ and $A[X]\otimes_AA[Y]$. This is obtained by using the (omitted but obvious) description of the above canonical bijections.