Show label depending on a drop down list

Hi everyone,

I have a form with the following fields :

2 dependant drop down lists :
name of the patient
service proposed during the consultation
a label depending on selected value of the previous drop down list that shows the price left to pay :
amount left to pay
a text field :
the amount payed

The problem is how to make the “amount left to pay” appear depending on the value of “service proposed during the consultation” selected ?
I need a function that calculates the amount left to pay, where should i put it ? and which relation does it have with the amout payed ?

I know i asked so many questions, but i tried different methods and i faild every time.
thank you