It's based on usage.
The more you get exposed to conversations
in Filipino or Tagalog, the faster you will remember
the sentence patterns.
Take for example: "Have you (singular) eaten?"
Correct Translation: "Kumain ka na ba?" (emphasis on the act of eating)
Awkward Translation: "Kumain na ba ikaw?"
Acceptable Variation: "Ikaw ba'y kumain na?" (emphasis on YOU)
While "Have you (plural; group) eaten?"
Correct Translation: "Kumain na ba kayo?"
Awkward Translation: "Kumain kayo na ba?"
Why doesn't "magdadagdag kayo ng gasolina ba" work?
It sounds awkward. Filipinos are more used to hearing
"magdadagdag na ba kayo ng gasolina."
"Ba" at the end assumes the thought behind
the action is complete.
For example, in "Kadarating mo lang ba?"
"Kadarating" means "has just arrived", which
is a complete idea.
"Ba" in the middle assumes the thought behind
the action is incomplete.
For example, in "Magdadagdag ba kayo... ng gasolina?"
"Magdadagdag" means "to add", which is
incomplete, because it is not clear exactly what
will be added.
I hope this helps. :-)
Hmmm... I'll turn this into a future Tagalog lesson in my Tagalog podcast.