The reason I say this is because if you write out the amount of cookies she can make with 6 cups of flour, you would get 30/6. 30 and 6 are both divisible by 6, so if you divided both by 6 you will get 5/1. 1 times 8 is 8, so if you multiply 5 by 8 you will get 40 cookies.
The 2 possible ways to fence in the patio are having 8x9, with the nine being the length of the wall. Because 8+8+9=26. The second way is 18x4 and the 18 being the length of the wall. Because 18+4+4=26.