Step 1:
To find $ P(A \text{ and } B) $ we use multiplication rule for independent events:
$$ \color{blue}{P(A \text{ and } B) = P(A) \cdot P(B)} $$In this example we have:
$$ \begin{aligned} P(A \text{ and } B) &= P(A) \cdot P(B) \\ P(A \text{ and } B) &= 0.3 \cdot 0.4 \\ P(A \text{ and } B) &= 0.12 \end{aligned}$$Step 2:
To find $ P(A \text{ or } 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) \\ P(A \text{ or } B) &= 0.3 + 0.4 - 0.12 \\ P(A \text{ or } B) &= 0.58 \end{aligned}$$