Let us divide the flour into two groups, A and B
now we know from the given question
A/B = 4/5
A = 4B/5
We also know there are 18 cups of flour in total.
A + B = 18
So
(4B/5) + B = 18
(4B/5) + (5B/5) = 18
9B/5 = 18
B = (18*5)/9
= 10
Then
A = 18 - B
= 18 - 10
= 8
So the ratio of dividing the 18 cups is 8:10