To find out how many students speak both Spanish and Japanese, we can use the principle of inclusion-exclusion.
Let:
- \( S \) be the number of students who speak Spanish, which is 65.
- \( J \) be the number of students who speak Japanese, which is 49.
- \( U \) be the total number of students who speak either Spanish or Japanese, which is 80.
- \( B \) be the number of students who speak both languages.
Using the formula for the union of two sets, we have:
\[ U = S + J - B \]
Substituting the known values into the equation:
\[ 80 = 65 + 49 - B \]
Now, combine the numbers:
\[ 80 = 114 - B \]
Solving for \( B \):
\[ B = 114 - 80 \]
\[ B = 34 \]
Therefore, the number of students who speak both Spanish and Japanese is 34.