[proofplan]
Both directions use the universal property of the polynomial ring. For the forward direction, if $A$ is generated by $a_1, \ldots, a_n$ as an $R$-algebra, the universal property of $R[T_1, \ldots, T_n]$ produces a unique $R$-algebra homomorphism $\varphi$ sending $T_i \mapsto a_i$, and the image of $\varphi$ equals $A$ because every element of $A$ is a polynomial expression in the generators. For the converse, if a surjection $\varphi: R[T_1, \ldots, T_n] \to A$ exists, then $A$ is generated by the images $\varphi(T_1), \ldots, \varphi(T_n)$.
[/proofplan]
[step:Construct a surjective $R$-algebra homomorphism from $R[T_1, \ldots, T_n]$ when $A$ is finitely generated]
Suppose $A$ is a finitely generated $R$-algebra, generated by elements $a_1, \ldots, a_n \in A$. By the universal property of the polynomial ring $R[T_1, \ldots, T_n]$, there exists a unique $R$-algebra homomorphism
\begin{align*}
\varphi: R[T_1, \ldots, T_n] &\to A, \quad T_i \mapsto a_i \text{ for } 1 \leq i \leq n.
\end{align*}
We verify surjectivity. Since $A$ is generated by $a_1, \ldots, a_n$ as an $R$-algebra, every element of $A$ is an $R$-linear combination of monomials $a_1^{\alpha_1} \cdots a_n^{\alpha_n}$ with $\alpha_i \geq 0$. Each such monomial is the image of $T_1^{\alpha_1} \cdots T_n^{\alpha_n}$ under $\varphi$, so $\operatorname{im} \varphi = A$. Hence $\varphi$ is surjective.
[guided]
The forward direction relies on the universal property of the polynomial $R$-algebra $R[T_1, \ldots, T_n]$: for any $R$-algebra $A$ and any choice of elements $a_1, \ldots, a_n \in A$, there is exactly one $R$-algebra homomorphism $\varphi: R[T_1, \ldots, T_n] \to A$ with $\varphi(T_i) = a_i$ for each $i$. This homomorphism is the "evaluation at $(a_1, \ldots, a_n)$" map: it sends a polynomial $p(T_1, \ldots, T_n)$ to $p(a_1, \ldots, a_n)$.
Suppose $A$ is generated by $a_1, \ldots, a_n$ as an $R$-algebra. This means $A$ equals the smallest $R$-subalgebra of $A$ containing $a_1, \ldots, a_n$, which consists of all $R$-linear combinations of monomials $a_1^{\alpha_1} \cdots a_n^{\alpha_n}$ with $\alpha_i \geq 0$. By the universal property, we obtain
\begin{align*}
\varphi: R[T_1, \ldots, T_n] &\to A, \quad T_i \mapsto a_i.
\end{align*}
Is $\varphi$ surjective? Every element of $A$ is an $R$-linear combination of products of the $a_i$, i.e., a sum of terms $r \cdot a_1^{\alpha_1} \cdots a_n^{\alpha_n}$ with $r \in R$. Each such term equals $\varphi(r \cdot T_1^{\alpha_1} \cdots T_n^{\alpha_n})$. So every element of $A$ lies in $\operatorname{im} \varphi$, and $\varphi$ is surjective.
[/guided]
[/step]
[step:Recover finite generation of $A$ from the existence of a surjection]
Conversely, suppose there exist $n \geq 0$ and a surjective $R$-algebra homomorphism $\varphi: R[T_1, \ldots, T_n] \to A$. Set $a_i = \varphi(T_i)$ for $1 \leq i \leq n$. Every element of $A$ is of the form $\varphi(p)$ for some polynomial $p \in R[T_1, \ldots, T_n]$ (by surjectivity). Since $\varphi$ is an $R$-algebra homomorphism, $\varphi(p(T_1, \ldots, T_n)) = p(a_1, \ldots, a_n)$, which is a polynomial expression in $a_1, \ldots, a_n$ with coefficients in $R$. Therefore $A$ is generated by $a_1, \ldots, a_n$ as an $R$-algebra, and in particular $A$ is finitely generated.
[/step]