Let us assume that product K is produced by using 2 inputs say, x and y.
Now lets assume that input x is priced at 2per unit and y at 5 per unit and the firm produces 100 units of each input per product
So, the total outlay would be 200 +500 = $ 700
Now if the price of y moves to 6 per unit than the total cost gets on to $800.
To bring down the cost we may use less of input y and more of input x.
But the quantity of the substitution will depend upon the substitutable proportion of such input.