Hi Radu Nedelcu. Fantastic question. The total value of the house is made up between debt (mortgage) and equity (which equals the value of the home minus the mortgage)
I think the best way to explain it is with an example.
If buy a $500,000 house with 20% down ($100,000).
You have a $400,000 mortgage and
$100,000 in equity (your down payment).
The 3% annual mortgage cost would be equal to $12,000 ($400,000 X 3%)
The 3% opportunity cost would be equal to $3,000 ($100,000 X 3%)
Combined the cost of debt and oppurtunity cost of equity= $15,000 ($12,000 for debt + $3,000 for equity). $15,000 is 3% of the total $500,000 value of the house.
Since the value of the house Must be equal to total debt + total equity and since both debt and equity are assumed to have a 3% cost, that is where we come up with the 3%.
Does that make more sense?