When testing the difference between the means of two independent samples, we use a two-sample $t$-test.
The test statistic is calculated as:
$t = \dfrac{\bar{x} - \bar{y}}{s \sqrt{\dfrac{1}{n_1} + \dfrac{1}{n_2}}}$
Here, $\bar{x}$ and $\bar{y}$ are the sample means, $s$ is the pooled standard deviation, and $n_1$, $n_2$ are the sample sizes.
This formula accounts for variability from both samples and is valid when population variances are assumed to be equal.
The numerator measures the difference in sample means, while the denominator adjusts for standard error.
Hence, option (B) is correct.