How To Show That B is Semi-Decidable Given A
A language is semi-decidable if there is a Turing machine that halts for all strings in the language, and doesn't halt for strings not in the language.

You are given that $A$ is semi-decidable. Therefore there is a Turing machine $M$ that halts on an input $x$ iff $x \in A$. Your goal is to construct another Turing machine $M'$ that halts on an input $x$ iff one of the prefixes of $x$ is in $A$. In other words, $M'$ should halt on $x$ iff $M$ halts on one of the prefixes of $x$.

You take it from here.