Was the ball in the end zone when it was illegally kicked?
Important information, yes.
If the kick happened in the end zone, no option, as the result of the play and the result of the penalty is the same - safety.
If the kick happened in the field of play, team B has the option of either taking the safety or taking the ball whereever the 10 yard penalty from the spot of the kick (half the distance, most likely) leaves the ball.