Hello, I'm Keith and happy to help you with your question. I am an ex RAPC and AGC(SPS) Major so have been in your situation myself. What HMRC are doing is applying your tax code to your military pension and arranging for your new employer to deduct tax at the basic rate. You should warn your tax office of your likely income for the year. They can arrange for the extra 40% tax element to be collected by reducing your tax code on your military pension to make you tax neutral by the year end. This is rather better than your new employer being told to deduct tax at 40% and you having to self assess and get back the resultant overpaid tax at the end of each tax year.
Please elaborate on your earnings from Afghanistan? From what you are saying it seems probable that your earnings there were outside the scope of UK tax as you were non resident whilst working overseas. In that case the P58 will trigger an end to this position and the tax year of return will be divided into two parts, one resident and one non resident. In these situations there will invariably be either a shortfall or an over payment. If the under payment does not exceed 3K HMRC will usually recover the unpaid tax through your tax code. I do hope I have helped, welcome home!