Suppose A plays the ball and doesn't run out of his crease, but B runs and reaches A's crease and then the ball hits the stumps at B's crease.
Who is considered out or can either one sacrifice his wicket?
Run Outs come under Law 38 - Cricket
If player A doesn't leave his ground (crease), then Player B is out. If both player has left the crease, then any player arriving at any crease earlier than other player is safe..
If A player doesn't run then the player B (which reach at A's crease) declared as out in your case because player A doesn't left his crease. But if the ball hits the stumps at A's crease then no one considered as out.
Hope this is helpful.
If the Batsmen have crossed in running, he who runs for the wick- et which is put down shall be out; if they have not crossed, he who has left the wicket which is put down shall be out. If a Batsman remains in his ground or returns to his ground and the other Batsman joins him there, the latter shall be out if his wicket is put down.