_ _ _ _ _ _ (6 places in a queue)
J should be ahead of F
Let's select any 2 spaces out of 6 for J and F: 6C2
The way to arrange these 2 people: 1 (Since J should always be ahead of F.)
Then for remaning 4 places, 4 other people can be arranged in 4! ways
Therefore, answer is (Selection of 2 places out of 6) * (Their arrangement) * (Arrangement of other 4 people)
= 6C2 * 1 * 4!
= (6*5/2) * 1 * (4*3*2)
= 360
(Once you understand the process, its easy to solve it in two lines. I would directly make 6 places (for picturising - not required), write 6C2*1*4! and then answer.)
Hope it helps!