There’s a well-known Gemara (Shabbos 31a) that says, “When a person is led in for judgment [in the next world] the first two questions G-d asks are: “Nasasa v’Nasata b’Emunah”, “Kovata itim LeTorah.” “Did you transact your business honestly?”, “Did you fix times for the study of the Torah?”
The Gemara in Shabbos (that declares business dealings to be the first matter judged in heaven) seems to contradict another Gemara (Sanhedrin 7a) that says, “The first thing a person is judged on is his Torah.”
Tosefos in Sanhedrin (s.v. elah) asks this question to which he provides two answers.
A third possible answer to overcome the seeming contradiction between the two Gemara’s is based on the terminology used in the Gemara Shabbos. The first question is “Nasasa v’Nasata b’Emunah” which is conventionally translated to mean – was your business done in good faith.
However, it could also be translated to mean was your “give and take” done in earnest. In actuality then, the first question in Gemara Shabbos is referring to Torah and aimed at the talmid chacham to probe as to whether his “shakla v’tarya” was done in earnest.
Therefore, indeed the Gemara in Sanhedrin is correct, that one is first judged on his Torah, and the Gemara in Shabbos gives the parameters of that judgment challenging the give and take of the talmid chacham.