Background:
I am a master's student working with a professor and PhD student. They provided me with an initial research direction, to solve problem A. To achieve that research goal, I identified a problem B that would prevent me to do problem A efficiently. I hence solved problem B independently first instead because it only makes sense. And that is what I wanted to publish first.
So for most of the work (ideas, writing and coding/results) I have been the main contributor (80% me and 20% a 4th co-author not part of any of this drama). PhD student and Professor have only been meeting and discussing with me on average 2 times a month. Those meetings were mostly about presenting the progress. Professor also did a significant amount of revising as compared to everyone else. Most of the writing and results were done independently by me, and as part of a collaboration scheme. I don't get paid, I don't get course credit or anything material in return.
Problem
PhD student has been unresponsive weeks leading up to the abstract deadline over multiple attempts to clarify logistics of a submission. Since it's only abstract I submit (I know horrible mistake) to not lose the chance for a full paper submission and PhD student goes livid and starts threatening me, to kick me out of the school, kick me out of the lab, sue me etc.
From further conversation what I understand he had in his mind that he wanted to be the first author and claimed he would "Think about giving us co-authorship". Which to me co-authorship order was obvious since everyone's contribution was obvious, let alone acknowledgement. And doesn't make sense because he doesn't even fully understand the paper or work.
Professor wants me to continue working on everything and doesn't seem involved or to be part of any of this (even if PhD student tries to incorrectly claim professor said things that Professor hasn't). Final paper submission deadline is in few days.
PhD student "doesn't have time to go back and forth with me", "doesn't have time to explain everything to me" about why he wants the paper removed or what he wants me to do. Thinks the quality of the paper is subpar and doesn't want to be associated with it. But he wants me to remove the submission and continue working on the paper and sending him my revisions and "push" for the deadline????.
All of these point to something nefarious but I still want to give the PhD student the benefit of the doubt.
Question
What are my options? I am not sure if this will hurt my reputation or his but probably both of ours. I really wanted to apply for PhD but not sure if this is what I thought academia was and reconsidering :/
How can I resolve this without losing my dignity? I am not willing to let someone else take credit for my work. I would rather not publish
How can I remove PhD student's contribution? Is the paper a dead-end? I obviously can't submit a full paper without his approval.
What can I do and have to do to address the request of the PhD student? What do I do in case of conflicts between PhD student and Professor?