Think of the left-hand side of the equation, \( \frac{d^2y}{dx^2} + 2y \), as a machine that takes in a function and spits out a new function, and this particular machine happens to be linear, meaning it treats a sum of inputs by just adding up what it would give for each input separately. Since \( y_1 \) is a solution, feeding it into the machine gives back \( f(x) \), and feeding in \( y_2 \) also gives back \( f(x) \), because both were assumed to satisfy the same equation. Feeding in the sum \( y_1 + y_2 \) is the same as feeding in \( y_1 \) and \( y_2 \) separately and adding the results, since the machine is linear, so the output becomes \( f(x) + f(x) = 2f(x) \). This means \( y_1 + y_2 \) must satisfy the equation with \( 2f(x) \) on the right-hand side rather than the original equation or any other multiple of \( f(x) \). So the correct choice is option (B).