How to handle retention with tax using Allowance charge in invoice.

I have invoice with standard tax and two line with retention amount. One line with retention amount having tax. I want to handle it using Allowance charge. Can you help on it. I have attached xml as well and screen shot of scenario.
XML file link

@azeemhafeez75 please check the thread below: