The short intuitive answer is that if $A=B$ then $cA=cB$ for any $c$. This must be the case for multiplication to be well-defined. Though $A$ and $B$ may be written differently, they are in fact the same number. If multiplication is well defined then when I multiply $c$ by something, say $A$, it shouldn't matter how I've written $A$, or what day of the week it is, or anything else, it only matters what number $A$ is. Since $A$ and $B$ are the same number, multiplying both by $c$ results in the same value.
In this case, the $c$ that you are multiplying by is $c=\frac{1}{2}$.
For a rigorous mathematical proof, you need to know that the real numbers (not including $0$) form a group. Think of the group as being the non-zero real numbers with the operation $\star$ being multiplication. Then, what you are looking at is the cancellation property. The statement and proof are as follows:
In any group $G$ if $ca=cb$ then $a=b$.
Proof
\begin{align*}
a &= 1\star a \\
&= (c^{-1}\star c)\star a \\
&= c^{-1}\star (c\star a) \\
&= c^{-1}\star (c\star b) \\
&= (c^{-1}\star c)\star b \\
&= 1\star b \\
&= b
\end{align*}
The reals are, a field, which implies that the non-zero elements form a group under multiplication. Depending on how you construct/axiomatize the reals, they may just be defined to be a field. For more proofs of these "basic" properties see: http://faculty.atu.edu/mfinan/4033/absalg14.pdf