The problem sentence:
I have always liked thinking through complicated problems to find creative solutions, be they in a mathematics class or while helping a friend.
I wrote this sentence for a personal statement; however, someone pointed out that the portion after the comma (bold) was incorrect. He said that the phrases on each side of the 'or' should be parallel in structure. So, if I was using 'in a mathematics class' (a prepositional phrase) before the 'or', I should use a prepositional phrase after the 'or' as well. He recommended that I drop the 'while' altogether (because it's not a preposition) or replace it with a preposition. Is he correct or should I leave the sentence as is?