I answered this using trial and error, so let me know if you need workings, but I got the dimensions as 18 inches and 13 inches.
I hope this helps!
8 is constant
6 is co efficient
N is variable
385 bags/ 8 bagels per bag = 48 r 1
48 1/8 bags
She will need 49 bags to put all the bagels in.