Solution
= Solution
\b[No.] Take $A=M_2(K)$ and its diagonal <subalgebra> $B$. The <algebra over a field> $B$ is commutative, so $Z(B)=B$. But $e_{11}\in B$ does not commute with $e_{12}$:
$$
e_{11}e_{12}=e_{12},\qquad e_{12}e_{11}=0.
$$
Hence $e_{11}\notin Z(A)$, although $e_{11}\in Z(B)$. Commutation inside a <subalgebra> places no condition on elements outside it.