To solve the proportion
[tex]\[
\frac{3}{x} = \frac{15}{40}
\][/tex]
we need to find the value of [tex]\(x\)[/tex] that makes this equation true. We can do this by cross-multiplying, which involves multiplying the numerator of one fraction by the denominator of the other fraction.
First, cross-multiply the two fractions:
[tex]\[
3 \times 40 = 15 \times x
\][/tex]
This simplifies to:
[tex]\[
120 = 15x
\][/tex]
Next, solve for [tex]\(x\)[/tex] by dividing both sides of the equation by 15:
[tex]\[
x = \frac{120}{15}
\][/tex]
Simplifying the division:
[tex]\[
x = 8
\][/tex]
Thus, the value of [tex]\(x\)[/tex] that makes the proportion true is
[tex]\[
\boxed{8}
\][/tex]
Answer: D. 8