Let $A$ be an arbitrary ring. In "Commutative Algebra" by Zariski and Samuel it is claimed that every continuous homomorphism $A[[Y_1,...,Y_m]] \to A[[X_1,...,X_n]]$ is a substiution homomorphism $Y_i \to f_i$, where $f_i \in (X_1,...,X_n)$. I think the statement is false. [I have replaced the proof with a more general one]

If $B$ is a $A$-algebra, which is complete with respect to the $I$-adic topology of an ideal $I \subseteq B$, then continuous homomorphisms $A[[Y_1,...,Y_m]] \to B$ correspond to $m$-tuples in $rad(I)$.

Proof: Clearly any such homomorphism $h$ is determined by the values $f_i = h(Y_i)$. If $h$ is continuous, then there is some $l \geq 1$ such that $(Y_1,...,Y_m)^l \subseteq h^{-1}(I)$. If $g_i$ is the image of $f_i$ in $R/I$, this means $(g_1,...,g_m)^l=0$. Such an $l$ exists iff all the $g_i$ are nilpotent, i.e. $f_i \in rad(I)$. Assume conversely that $f_i \in rad(I)$, say $f_i^r \in I$ for some $r$. Then for every $k \geq 1$, $A[Y_1,...,Y_m]/(Y_1,...,Y_m)^{kr} \to B/I^k, Y_i \mapsto f_i$ is well-defined and is compatible in $k$. In the limit we get the desired homomorphism $A[[Y_1,...,Y_m]] \to B$.

Thus in the example $B = A[[X_1,...,X_n]]$, the $f_i$ should have a nilpotent constant terms; they don't have to vanish.

Am I right? I'm a bit confused since I thought everything is right in such a book, even more such elementary considerations. I also wonder why the universal property of $A[[Y_1,...,Y_m]] \to B$ is only stated (at least in the literature I know) in the form, that every $m$-tuple in $I$ yields a homomorphism $A[[Y_1,...,Y_m]] \to B$, instead of really describing the hom functor as I did above.