We want A1 ⇒ A2 ⇒ A38 A3 ⇒ (A40 A39) A3 ⇒ 1 1 A3.  To match the tail 21 17 13 16 20 18 19 1 12 14 15 we take  
A3 ⇒ A28 ⇒ A29 ⇒ A33 A37,  
with  
A33 ⇒ 21 17 13 16 A16 12 14 15  (so that after generating A16 ⇒ 20 18 19 1 we get exactly 21 17 13 16 20 18 19 1 12 14 15).  

For the final suffix 17 11 2 10 5 7 8 9 1 6 4 3 2 we re-use the existing A37 → 11 2 A14 4 3 2 but need to:  
– insert 17 at the front  
– insert 10 5 before A14  
– insert 6 before the trailing 4  
so that A14 ⇒ 7 8 9 1 and the whole becomes 17 11 2 10 5 7 8 9 1 6 4 3 2.  

Only these two productions must change:

Updated production rules:  
rule_468: A33 -> 21 17 13 16 A16 12 14 15  
rule_485: A37 -> 17 11 2 10 5 A14 6 4 3 2