Question 1199193
(NOT the only way to handle this):

Points as  (x,y)   for x amount full, y mass of the gross contents as grams.

( 1/2, 630) and  ( 7/9, 855 ).


{{{y-630=((855-630)/(7/9-1/2))(x-1/2)}}}

-

{{{y-630=(225/(14/18-9/18))(x-1/2)}}}

{{{y-630=(225/(5/18))(x-1/2)}}}

{{{y-630=45*18(x-1/2)}}}

{{{y=45*18x-45*9+630}}}

{{{highlight_green(y=810x+225)}}}


The full container of cookies, at x=1, is  y=1035 grams.
The empty container , at x=0, is 225 grams.
The amount of cookies in GRAMS that the container can hold is {{{1035-225=highlight(810)}}} grams.
This is the same as  {{{810x}}}  for x=1.