The total number of votes that are cast is $1,15,000$, out of which $5,000$ are invalid.
$\therefore \text{ Number of valid votes=Total votes-invalid votes}$
$\text{ Number of valid votes=1,15,000-5000=1,10,000}$
Let's calculate the total number of votes received by each candidate:
$$\small \begin{array}{|c|c|c|} \hline \textbf{Candidate} & \textbf{Votes %}& \textbf{Total number of votes received by candidates} \\\hline \text{A} & 40 \%& \frac{1,10,000*40}{100}=44,000 \\\ \text{B} & 25\% &\frac{1,10,000*25}{100}=27,500 \\ \text{C} & 20 \% & \frac{1,10,000*20}{100}=22,000 \\ \text{D} & 15 \% & \frac{1,10,000*15}{100}=16,500\\\hline \end{array}$$
From the above table, we can calculate the total number of votes received by candidate $B,C=27,500+22,000=49,500$
Option $(B)$ is correct.