That would be a safety.
The ball in joint possession is "awarded" to the team in team possession (K, in your situation), and then the status of the play is evaluated.
If, after the joint possession is disambiguated, the result of the 4th down play is A/K in possession of ball behind the line to gain, the the ball is turned over on downs to B/R and they are awarded a first down. If the joint possession occurs in A/K's end zone, the result of the play is the dead ball in A's end zone, and therefore a safety, prior to any evaluation of whether A/K reached the line to gain.
B/R is not awarded the ball during a joint possession situation, unless they were multiple COP and B/R was in team possession before the last loose ball.