How the final grade formula works
The final exam score needed is: desired grade minus current grade times the non-final weight, divided by the final exam weight.
Use your syllabus percentages when possible. If your teacher uses points instead of percentages, convert your current score first.