Cost of discount/origination points = 1% of the mortgage*number of pints in question.
In the current scenario:
Mortgage taken = $394,000
Discount points = 4
Origination points = 5
Then,
Cost of discount points = 0.01*394,000*4 = $15,760
Cost of origination points = 0.01*394,000*5 = $19,700