How to write budget constraint if the agent sell the goods that buy Della’s utility is $U(G,R)$ 

G is the consumption of gasoline per week

R is the the consumption of other goods 



Just help me to write down budget constraint. 

I think that 

$$R*1+(G-20)*10+20*1=1000+10*X$$

where 

X is the amount of the gasoline that she sell on the black market.
Agent is a buyer of gasoline in the black market if his consumption of gasoline exceeds 20 i.e. $G &gt; 20$, and he buys $(G-20)$ units from the black market in this case. So, his budget constraint is $R + 20 + 10(G-20)=100$

Likewise, agent is a seller of gasoline in the black market if his consumption of gasoline is below 20 i.e. $G \leq 20$. In this case, he sells $(20-G)$ units in the black market. So, his budget constraint is $R + 20=100 + 10(20-G)$

To conclude, his budget constraint (in all cases) is $R + 20 + 10(G-20)=100$.