The problem with that question is the word “while”, which means “at the same time”, which presupposes a notion of universal time. In special relativity, time depends on your frame. Events which are at the same in B’s frame may not be at the same time in A’s frame. So you can’t say “while” without specifying whose…