What's wrong with my permutation logic? The given question:

In how many ways the letters of the word RAINBOW be arranged, such that A is always before I and I is always before O.

I gave it a try and thought below:

Letters A, I and O should appear in that order. Then there are four places in which all the remaining four letters can appear. It means there are a total of 16 places: $$*_1*_2*_3*_4\quad A\quad*_5*_6*_7*_8\quad I\quad*_9*_{10}*_{11}*_{12}\quad O \quad *_{13}*_{14}*_{15}*_{16}$$ 
  Out of these 16 places remaining, the letter can appear in any of the 4 places, giving total $^{16}P_4 = 43680$ possible arrangements. 

But the given answer is just 840 with following explanation:

All the 7 letters of the word RAINBOW can be arranged in 7! ways and 3 particular letters (A,I,O) can be arranged in 3! ways. But the given condition is satisfied by only 1 out of 6 ways. Hence required number of arrangements 
  $$=\frac{7!}{3!} = 840$$

So what's wrong with my logic? I must be counting certain arrangements multiple times or my logic must be at fault in large. But what's that exactly?

I think the closest method to your original attempt is the following: after laying out the fixed letters A, I and O, consider one additional letter at a time.
(1) We have: " A I O ". R can be placed in any of four places.
(2) We now have four placed letters, for example " R A I O ". In any case we have five locations in which the next letter N can be placed.
(3) Similarly when we place the B, there are 6 choices of where to put it among the existing 5 letters.
(4) And finally the last letter W can be placed among the 6 existing letters in any of 7 places.
Each combination of choices will lead to a different outcome, as any two outcomes must differ by the order of as at least one pair of letters.
So the total number of orders is: 4 * 5 * 6 * 7 = 840
