Team A can but will not decline the offside penalty, which would then allow team B to take the ball at the spot of the illegal touching.
Team A can and will accept the offside penalty resulting in a rekick after the five yard penalty from the previous spot.
Relevant rules are 6-1-2-c-7 (enforcement spot), 6-1-3-a,b,c (violation and foul), and 10-1-1-b (declining the penalty).