Is 'Siapa yang bersama kamu?' a formal sentence?
Whether 'whom' is required or not in the English sentence should be irrelevant as it has been falling out of use for quite some time now, except in formal (written) English.
'Together' is the word that doesn't belong in the answer given. Speakers of other Asian languages (e.g. Japanese) make this same mistake when translating to English.
However, even Google translate can figure it out nowadays: Indonesian to English: Who is with you? Malay to English: Who's with you?
If 'yang' is what is being taught in L2 (the target language) here, then they need to figure out a way to do it that makes sense in the L1 (first language).
Perhaps it should be something like, 'Who is THAT (boy/girl/person) with you?' I have no idea. In any case, the Duolingo Indonesian to English translations still need a lot of work.
I think Duolingo being a grammar nazi to this extent detracts from the language learning bit. 'Who' may be technically incorrect but practically speaking everyone except for English teachers or maybe Phd's will ask 'who are you with' in everyday conversation and should be acceptable as a slang interpretation here.
Of course, you may be completely right! I admit that I was taught very rigid, very old-fashioned grammar rules, so I might be completely out of date regarding modern usage. If it's all the same to you, let's not discuss it - not because we disagree or anything, just because I unfortunately have more pressing things than thinking too much about English grammar! Thank you for the link though; I appreciate it. Have a lovely day.
However "whom are you with" isn't correct in English, as it's either "who are you with" or "with whom are you...etc." because it's always 'who' when separated from 'with', and always 'whom' when preceded by 'with'. That's why we say 'with whom did you go?' and 'who did you go with?' - can't be the other way round. So it's the English answer in the question that's wrong. :(
dengan in this example is more Teh dengan gulah! Tea with sugar.
Bersama is more like when you're with a person, such as My girlfriend (or boyfriend) and I have been together 6 months. you'd use bersama. Perhaps it's better thought of as 'together with' although you wouldn't translate, I might be over simplifying but that's my understanding at this point!