w is the input with ounces as units. P is the output with dollars as the units. This is a function.
Work Step by Step
We know that w is the input because it is inside the parentheses. P is the output because it is the 'coefficient' of the parentheses. The units of ounces and dollars are both given in the problem. This is a function because every different weight of a package can only have one corresponding price.