Note, my numbers are for if a higher rank is better..
Joe's rank is 4, Tom's rank is 5, and Paul's rank is 6
Paul: "I don't know Tom's ranking."
Paul knows that he and Tom have consecutive positions, so if his degree was either 1 or N (the max), he would know Tom's ranking.
Tom: "I don't know yours, either."
Tom now knows that Paul's ranking is neither at the top nor at the bottom, but since he still doesn't know Paul's ranking that means his ranking is not 2 or N-1.
Paul: "I already knew that."
This means Paul already knew Tom wasn't at 2 or N-1, so Paul's ranking must be greater than 3 and less than N-2. Note: I'm assuming here that Paul would have mentioned if they knew Tom's ranking at this point. If that's not the case, then Paul could have 2 or N-1 and know (although he hasn't said it) Tom's rank.
Joe: "Now I know that I am last among the three of us."
Right before Paul's second statement, Joe would only know that Paul's ranking must be at least 2, with Tom's possibly being 3. After Paul's second statement, Tom could still be at 3 with Paul being at 4. Joe's ranking must be 4 because he now knows he is last - up until Paul's second statement there was the possibility that Tom and Paul could be below Joe, but since Paul cannot be lower than 4, and Joe has 4, he knows Paul and Tom must be above him.
Tom : Me too I just knew that I'm not the first between the three of us.
Up until Joe's statement, Paul could have been in rank 4. Now that Tom knows he is below Paul, he must have rank 5, otherwise he would not have been able to tell. That leaves Paul to be rank 6.