The equation would be y=0.45x.
Let x be the number of cookies Matt made. Since Phil made 25% more, and 100%+25%=125%=125/100=1.25, the number of cookies Phil made can be represented by 1.25x.
Together the cookies they made are represented by x+1.25x=2.25x
Since there were 20% of the cookies remaining, this means they sold 100%-20%=80%=80/100=0.8 of the cookies:
0.8(2.25x) = 1.8x
Each cookie sold for 0.25, so we have
0.25(1.8x) = 0.45x
Letting y be the money they make, we have
0.45x=y