Translation:My friend and I like the mathematics subject.
A more natural English translation would be "My friend and I like mathematics" or "...the math course"
I would agree with "My friend and I like math(ematics)" and "the math course," as well as "the math class."
Are you referring to the "My friend and I" bit? I assumed that's because it's correct English to order it as "My friend and I" ("Me and my friend" is not grammatically correct, but often used casually in conversation) and maybe it's the same way in Indonesian where it's more natural or grammatically correct to order it as "Saya dan teman saya".
"Me and my friend" is not grammatically correct, but often used casually in conversation
What's gramamtically incorrect about that?
when you're the subject of the sentence, you use the nominative form "I" and not the accusative form "me". So "I did it", not "Me did it.". But "He did it to me", not "He did it to I." because now you are the object in the sentence.