A plane-sweep algorithm for a points in triangles inclusion problem
Generally, you can analyze each step of the algorithm. Step 2 for constructing the tree (as insert operation can take $O(\log(n))$) is $O((p+t)\log(p+t))$. 
All operations in if statements take $O(\log(n))$ (finding the minimum, deleting a member, inserting a member, and so on). Also, the main while loop takes $|X|= p + 3t$.
Hence time complexity of the algorithm would be $O((p+t)\log(p+t))$ as you guess.

In sum, to analyzing time complexity of an algorihtm in a formal manner, it would be enough discussed on each step of the algorithm. 

For correctness, you should show that this algorithm can find a general point inside its triangle correctly.