How to determine the traffic avoidance manuver? Scenario A: I started the takeoff roll and then noticed another aircraft is crossing the runway in front of me, how could I determine what is the best avoidance maneuver, like full braking to abort the takeoff? Or proceed take off and leave the ground before the collision? Or change the aircraft heading just like a car driver to avoid the traffic, in which my aircraft could probably rushed out of the runway?

Scenario B: I am holding on the runway and ready for takeoff and another aircraft is on the final to land, should I initiated takeoff ASAP or exited the runway? If I initiated the takeoff and the landing aircraft also take avoidance action and do a go around, will things getting worse since we may collide in air?
In Scenario A there is no obvious answer. You take whatever action is necessary to avoid a collision. If this were a controlled airfield there would be questions raised to the ground controller. If not, similar questions would be directed at the pilot entering a runway without notifying anyone. Even at a completely deserted airfield without any form of station any pilot entering a runway would announce it on a radio beforehand just in case!

Scenario B can be a little more specific, and is a situation that occurs reasonably often at small airfields - less so at large controlled airports. Assuming you've not just busted onto the runway, ignoring traffic on final approach you probably have priority over the approaching aircraft. But if you're a large airliner and/or at a controlled airfield its hugely unlikely you've been cleared to enter the runway to line up if something is on final approach.

If this does happen:


an airliner would follow a missed approach procedure, which would take them well out of the way of the departing aircraft
a light aircraft would perform a similar manoeuvre but commonly known as a "go around". This involves positioning so that the pilot can keep eyes on the departing aircraft, for example flying just to the right of the runway at circuit height.