For (gar). Explanation of the reason for asking her.
Were gone away (apelēlutheisan). Past perfect of aperchomai, to go off. They had already gone before she came. To Sychar (Joh 4:5 and Joh 4:39).
To buy food (hina trophas agorasōsin). Hina in purpose clause with first aorist active subjunctive of agorazō, old verb from agora (marketplace). See Mat 21:12. Trophē (nourishment) is old word from trephō, to nourish (Mat 3:4). “Victuals” (plural).