Equivalence of Definitions of Unital Subalgebra

Theorem
Let $R$ be a commutative ring.

Let $\struct {A_R, *}$ be an unital algebra over $R$ whose unit is $1_A$.

Let $\struct {B_R, *}$ be a subalgebra of $A_R$.