Sounds to me like a GroupBy
clause would be better suited here
var studentsByProfessor = students.GroupBy(x => x.profId)
.Select(g => new
{
ProfName = professors.FirstOrDefault(x => x.id == g.Key)
.Select(x => string.Format("{0} {1}", x.FirstName, x.LastName)),
Students = g.ToList()
});