To find $ P(B) $ we use an addition rule:
$$ \color{blue}{P(A \text{ or } B) = P(A) + P(B) - P(A \text{ and } B)}$$In this example we have:
$$ \begin{aligned} P(A \text{ or } B) &= P(A) + P(B) - P(A \text{ and } B) \\ 0.89 &= 0.4 + P(B) - 0.01 \\ P(B) &= 0.89 - 0.39 \\ P(B) &= 0.5 \end{aligned}$$