You had paid total premium of Rs. 22,000 for yourself and your spouse. Since neither of you are senior citizen, basic deduction under Section 80D is Rs. 15,000 (Actual premium paid Rs. 22,000 or Rs.15,000 whichever is less).

You have also paid Rs. 17,000 for your father mediclaim premium, for which you are eligible for additional deduction. Since your father is a senior citizen, deduction under Section 80D is for Rs. 17,000 (Actual premium paid Rs.17,000 or Rs.20,000 whichever is less).

Thus total deduction under Section 80D comes to Rs. 32,000.

Section 80D does not cover relatives other than Spouse, Children and Parents, so the premium paid by you for your dependent mother-in-law isn’t eligible for deduction.