You can work out what you have already by where is the grade you obtained for that test and is how much of the final grade the equivalent test is worth. means the sum of so you add them once multiplied. x and y should be expressed as decimals.

What score do I need to get in my final exam, in order to pass my course?

I got:
55% for a test worth 15% of my final grade.
48% for a test worth 20% or my final grade.
65% for a test worth 25% of my final grade.
and the exam I'll be doing is worth 40% of my final grade.

What is the least percentage I need to get in my exam in order to pass the course?

What a question! How can the answer to this question possibly be relevant to your exam preparation!?

I suggest you worry more about things like doing your best and less about things like what the hypothetical bare minimum is that you need to scrape a pass. You will probably do much better as a consequence.