Hi Onekeano. Firstly, I am assuming that the 40,000 pension includes any State Pension. The approx tax payable on 40,000 would be about x. ( 32,800@ 20%, 7,200 @41%, =9,512. less Credits 2,1900 widow, 1,650 PAYE gives Tax payable of 5,672.
So, in answer to your direct question, this (5,672) is the maximum tax refund they would get,( because that is all the tax they have paid) eventhough they are paying 45,000 pa in care fees.
In order to get full relief on the 45,000 annual fees, one needs 45,000 taxable income at the 41% rate.