Oh dear, oh dear!
The sentence in the OP was, quite evidently, one related to a military situation and all three of the ranks/appointments (see line 1 of my response at 0730 today) were preceded by the word ‘the’. Thus, we were clearly dealing with quite specific people and posts in a quite specific environment…one I know like the back of my hand. Had it been another environment I was unfamiliar with, such as a hospital, I would probably have skated on by on the basis that – as I explained earlier – I didn’t “know a blessed thing about it”.
For example, had I been asked to comment on where capitals should be used in a sentence such as, “the sister was rapidly on the scene with the matron hot on her heels,” I would probably (a) just have ignored the question as explained above, but - had some mad compulsion to respond fallen upon me - I would certainly have written, “The Sister was rapidly on the scene with the Matron hot on her heels.” Note the two uses of ‘the’ preceding the posts and the two capitals.
Flying Officer is the name of a specific RAF rank and is, as such, effectively a proper noun and thus necessitates capitals.
I’m sure The Builder must be getting rather tired of this by now; I certainly am!