Avraham Avinu meets malki tzedek, the kohen, and gives him maaser (14;20). But maaser is meant to be for a levi (bamidbar 18;21-24) – How could Avraham give it to a kohen? 3 answers…
1) The word ma’aser does not need to mean halachic maaser; it just means 1 in 10 (see targum there).
2) This was not necessarily ma’aser tevuah which goes to a Levi. It was maaser kesafim, which goes to any charitable cause – see Rambam, Raavid, and kesef mishna carefully all in hilchos melachim 9;1. After all, if it was maaser tevuah there would have to have been crops/produce to give. But the pashut phsat is that all Avraham gave was ‘all the bounty from the war – i doubt that all Avraham captured from the war was corn and barely! This derech is anyway meduyak in rashi. Rashi says Avraham gave maaser ‘from everything that Avraham owned’ – now Avraham did not only own crops and animals. He had gold, etc too. Therefore it must have been maaser kesafim. So why to a kohen?Because that was the most worthy cause available then.
3) THE TRUE ANSWER! Let’s say it was maaser tevuah, as mashma in rashi there. [by the way, maaser beheima does not go to the Levi; Rambam bechoros 6;4].
Maaser tevuah can actually be given to either a kohen or levi – this is muchach at the top of yevamos 86a “is there one who forbids giving maaser to a kohen?.” And it was later a takkanah of Ezra to give maaser only to the kohen, not to the Levi. So why did Avraham give it to a kohen and not a Levi anyway?
a) Maybe there were not any leviim / none that Avraham knew
b) He took the opportunity to fulfil the mitzvah as soon as he could, and there was a kohen here so he gave it to him. But if there would have been a levi there Avraham might have given the maaser to him.
c) The pasuk says (Bamidbar 18;21 & 24) that the Leviim were given maaser as a reward for working in the mikdash and as compensation for having no nachala in Eretz Yisrael. None of these reasons applied in the time of Avraham (there was no mikdash and no nachlas eretz yisrael to the tribes), so he gave the maaser to a [intrinsically holy] kohen.