That is correct.
The illegal kicking is simply a team B foul during live ball, it is enforced using the 3-and-1 principal with the end of the related run as the basic spot. Since it is a foul by the opponent of the team in possession, it is enforced from the basic spot. Additionally, the ball was already in the endzone, so you cannot change the reason the ball was in the endzone (impetus), unless it leaves and comes back in.
If team B kicked the loose ball from the B-1 through the endzone, then the result of the play would be a safety, because the impetus from the fumble would be replaced by the new impetus from the kick in the field of play.
Note: Team A would still have the option to accept the penalty enforced at the B-1 because the foul occurred while team A was in possession.
10-2-2-c, 10-2-2-d-1, 5-2-4, 8-5-1-a, 8-7-1, 8-7-2-b-1-Ex, 8-7-2-b-1, 9-4-4