need some slight help with Genki 1. On the listening comprehension, it asks what the person was doing. I interpreted the sentence as へやでけんさんとおんがくをきいていました but the book lists the answer as (けんさんと) へやでおんがくをきいていました。Is my first answer considered correct with the placement of けんさんと after へやで?
Yes, the answer is correct. As long as the verb is in the end of the sentence, you can switch who and where freely. You just need to take care that the text modules けんさんと and へやで stay together. The placement of と just means "with" or "and" in this context. で is the particle for the place where things are taking place.
And just as a reminder, invisible in this sentence is わたしは.
So in summary, either you say: "I was with Ken in my room listening to music." or "I was in my room with ken listening to music."