If you live in a house with people who do not keep Shabbos and you all have dinner, and a guest or someone else living in that house brings kosher food for dinner bought on Shabbos, can a Jew eat that food on Shabbos? You did not buy the food or ask that someone should, and the food was not cooked on Shabbos.
NordicMountain, as a new user to Mi Yodeya, welcome aboard and Shavuah tov.
Congratulations on trying to keep kosher too. Eating only kosher food helps to keep someone Jewish, spiritually healthy and their faith strong. May G-d bless you and strengthen you in your observance.
Without getting into great detail, generally speaking traditional Jewish practice is not to derive benefit, including eating, from the actions of another Jew violating any of the commandments.
You haven’t specified if the person who purchased and brought the food to your apartment was Jewish. Non-Jews are not commanded to observe Shabbat. So that aspect would not be a problem for a non-Jew.
Additionally, you haven’t indicated if the food was in a sealed package and other details that would be relevant to answering your question in a complete way.
In keeping with the general policy of this site, you should consult with your local Orthodox Rabbi who knows you and your specific situation to get the correct answer to your particular question.
All the best.
If you should acquire food on Shabbes that came into your possession through another Jew’s Shabbes transgression (either because s/he purchased it on Shabbes, or due to the means by which s/he transported it on Shabbes to your place), you are only allowed to derive benefit from it once Shabbes is over.
This ruling is recorded by the Rambam (Hilkhos Shabbes 6:23) and is in the Tur (Orach Chayim 318:1). It might also be the opinion of the Shulchan Arukh (ibid.), although the latter only mentions the aveira of cooking. If you want to study this sugya, it’s predicated on a mishna (Terumos 2:3), and is found in the gemara in various places as well (Bava Qama 71a, Chullin 15a and Gittin 53b).