In general, one may not be seated in the presence of someone who is saying the amidah, as it is considered disrespectful. (Either because he appears unwilling to accept ol malchut shamayim (Aruch Hashulchan OC 102:3) or because the area around one who is praying is considered holy (Aruch Hashulchan OC 102:4)).
1. There is a debate regarding sitting down to learn torah in the presence of someone else praying; some hold that this is permitted as it does not connote disrespect to the prayer, as he is also involved in a form of kabbalat ol malchut shamayim and/or holy matters, but Tur holds it is forbidden, as it still conveys disrespect. (Aruch Hashulchan OC 102:3 - 4)
[This is what is being referred to later in 102:9 as דעת הטור דתורה אינה פוטרת העמידה - the Tur's view that (in general) Torah study does not exempt one from standing.]
2. What happens if the sitter was sitting first, and then the prayer started praying? The strict letter of the law is that we say that is the prayer's fault for starting to pray in the sitter's presence, and the sitter is exempt from standing, as there is no disrespect implied (Aruch Hashulchan OC 102:8).
The Aruch HaShulchan in OC 102:9
Aruch HaShulchan starts by noting that some limit the exemption in point 2 above (where the sitter was already sitting) to a private home. However, in a synagogue, where by definition people come to pray, we cannot fault the prayer for starting to pray in the pre-sitter's presence, and so the sitter must stand, even though he was sitting first.
However, if the sitter was sitting first, and was also studying torah, we do not invoke the Tur's stringency (discussed in point 1 above) to say that he must stand. Rather, here, where he is sitting first and engaged in Torah study, he need not stand.
My own thoughts
From the Aruch HaShulchan's words, it is unclear to me why the Tur's stringency does not apply in this case. I have two possible explanations:
a. We don't want to apply a double stringency: i) Torah study does not exempt standing (the stringency of the Tur) and ii) sitting first is not an exemption from standing in a synagogue;
b. The rationale for requiring a pre-sitting sitter to stand in a synagogue (because the prayer can reasonably expect to enter a synagogue and pray without being prevented by those sitting there and doing nothing) is not relevant here where the pre-sitter is behaving appropriately by sitting and learning. Thus, the prayer should not have started praying next to the one already sitting down, and therefore the sitter does not have to stand.