As you stated this is a dependent probability and can be solved using bayes rule as follows.
Let we define two further events such that $E_o=\text{all digits are odd}$ and $E_e=\text{all digits are even}$. Thus $P(E)=P(E_o\cup E_e)$ Since , $P(E)$ can be written as, $P(E)=P(E_o)+P(E_e)$
So the original question becomes,
$$
P(B \cap E)=P(B \cap (E_o\cup E_e))=P((B \cap E_o)\cup (B \cap E_e))=P(B \cap E_o)+(B \cap E_e)
$$
Since $B \cap E_o$ and $B \cap E_o$ are disjoint events.
$P(B \cap E_o)$ can be computed using the Bayes rule:
$$
P(B \cap E_o)=P(B | E_o)*P(E_o)
$$
Where $P(E_o)=\frac{5*5*5}{10*10*10}=1/8$ (probability that all digits are odd) and $P(B | E_o)=\frac{5*4*3}{5*5*5}=12/25$ (probability that all digits are unique given that all numbers are odd. This decreases our sample space from 0,...,9 to 1,3,5,7,9)). Thus $P(B \cap E_o)=P(B | E_o)*P(E_o)=(1/8)*(12/25)=3/50$.
I believe $P(B \cap E_e)$ is same as $P(B \cap E_o)$ since they are symmetric. Thus the answer should be $3/50+3/50=3/25$