Step 1: Approach:
Take the normal profit and the partners' salary together as a yearly deduction, then work on the profit left.
Step 2: Yearly deduction:
Normal return is 15,000 and salaries total 12,000. The total deduction is 27,000 every year.
Step 3: Super profit by subtraction:
2022: 30,000 - 27,000 = 3,000. 2023: 36,000 - 27,000 = 9,000. 2024: 42,000 - 27,000 = 15,000.
Step 4: Total for the two rules:
Sum of 3 years = 27,000. So 2 years' purchase of the 3 year average = 2 x 27,000 / 3 = 18,000. Sum of last 2 years = 24,000. So 3 years' purchase of the 2 year average = 3 x 24,000 / 2 = 36,000.
Step 5: Pick the smaller:
The smaller value is 18,000. This is option 4.
Final Answer:
Goodwill is Rs. 18,000.
\[ \boxed{18{,}000} \]