taking the cooking time example:

"15 minutes + 35 minutes per kilogram"

This would be

for 1kg: t = 15 + (35*1)

for 2kg: t = 15 + (35*2)

for 3kg: t = 15 + (35*3)

for 4kg: t = 15 + (35*3)

...

for 10kg: t = 15 + (35*10)

...

What if i told you the number of kilograms was "x" insead of specifying the number

forxkg: t = 15 + (35*x)

The same approach may help on the other question