The sentence with proper subject-verb agreement is B. The student as well as the teacher want to go to the museum. In this sentence, the subject is what we call a compound subject, meaning that the verb refers and agrees with more than just one singular word. The compound subject is "student" and "teacher" and they are connected by "as well as", which functions as a coordinating conjunction would. That's why the verb should conjugate in its plural form.
Option A is incorrect because the structure inside parentheses is not related to the verb and does not influence its conjugation. Options C and D have a verb in the singular form for a compound subject - that would demand a plural conjugation.