1) The interdiction to sit within four cubits (behind or at the side of of) one who is praying is only when sitting and doing nothing. If, however, he himself is occupied with prayer, he is permitted to sit. Regarding sitting in front of him, some permit sitting when occupied with necessities for praying, and others forbid sitting in front of one who is praying in any case even if he sits outside the distance of four cubits as it appears as if the man praying is bowing to the man who is sitting. (Shulchan Aruch and Mishne Berurah 102)
2) If one is learning Torah, one may sit behind one who is praying, but one should be stringent and not sit to his side or in front of him unless there is a sever necessity.