Yes, you can say I want to pass the B2 exam for both.
You could also say 'I'm hoping to pass the B2 exams in both English and French' or 'I am aiming to reach a B2 level in English and French' if it is formal, like in a covering letter for a job. In England only people who do languages know about the CEFR levels so I would say 'the B2 exam (according to the CEFR grading system)...' so that they can look it up if they need to.