"I am at the table with the lunch."
Translation:Ich bin am Tisch mit dem Mittagessen.
The thing is that "mit dem Mittagessen" is not an object but additional information and it is not a noun phrase but a prepositional phrase. Think of "I am at the table at noon." Twice prepositional phrases with "at". In the given sentence "an" requires dative and "mit" requires dative.
yaliyev In this sentence there are 2 prepositional phrases and since each preposition has its own tense of either Dativ or Akkusativ, then choosing 2 Dativ prepositions would make this possible. But from our previous lessons on "to and from," I can see how you would ask that valid question.
Here's an abstruse question: There was a choice of three sentences, one of which was the recommended one, one of which was clearly wrong, and one of which was "Ich bin am Tische mit dem Mittagessen." Now, what if I'd chosen that third sentence? Would Duo have accepted it on the grounds that it uses the old dative ending -e? (See the inscription on the Reichstag building: Dem Deutschen Volke.)
That is less correct. Beim (bei dem) is translated as near or by the object, in your sentence it would be the lunch. The correct words in this case are mit dem (with the) lunch.
At the table is saying you are very close to it, standing near the table, whereas on the table is saying you are physically on top of the table.
The case is determined by the preposition "mit", which always requires the dative case. This is something you just have to memorize. Note that there are some prepositions that can take either accusative or dative case, depending on whether motion is being indicated. For example, "Ich gehe ins Haus", but "Ich bin im Haus". "ins" means into, but "in" just means in/inside.