Jesus is talking to a group of people about what they as individuals should and should not do. The "you" in "you have heard" is plural. The "you" and "your" are singular in "You must love your neighbor and hate your enemy," but in some languages they may need to be translated as plural. (See: [[rc://en/ta/man/translate/figs-you]])
This can be stated in active form. See how you translated this in [Matthew 5:27](../05/27.md). Alternate translation: "that God God said" or "that Moses said" (See: [[rc://en/ta/man/translate/figs-activepassive]])
Here the word "neighbor" does not refer to a specific neighbor, but to any members of one's community or people group. These are people whom one usually desires to treat kindly or at least believes he ought to treat kindly. Alternate translation: "your countrymen" or "those who belong to your people group" (See: [[rc://en/ta/man/translate/figs-genericnoun]])