Equivalence of Definitions of Unital Associative Commutative Algebra/Homomorphisms

Definition
Let $A$ be a commutative ring with unity. Let $(B, f)$ and $(C, g)$ be rings under $A$.

Let $h : B \to C$ be a mapping.


 * 1) $h$ is a morphism of rings under $A$.
 * 2) $h$ is a unital algebra homomorphism from the algebra defined by $f$ to the algebra defined by $g$.