Why is the price of capital ‘r’ ? (From Cost function)
Firstly, in your example the value of $r$ (as used by economists in this context) would be $1.03$, not $0.03$. Economists call this the "interest rate", but you might prefer to think of it as the "rate of return on capital".

Secondly, what we define as constituting one unit of capital is pretty arbitrary. Is a computer one unit of capital or ten units of capital? It doesn't make any difference, just like it doesn't matter whether you measure distance in meters or feet, so long as everyone knows what units you are using. Since this choice is arbitrary, economists usually make the simplest possible choice and measure units of capital in units of money (e.g., dollars), meaning that one unit of capital has a price of one dollar by definition: $P(K)=1$.

If we return to your formula with $r=1.03$ and $P(K)=1$:

$$K[P(K)+0.03P(K)]=P(K)K(1+0.03)=Kr,$$

we get exactly the cost you saw in your course.