There were 3 girls in the Grade 7 class who joined both of the clubs.

Total number of girls : 20
Girls who joined club A : 9
Girls who joined club B : 14
Total number of recruited girls : 23

17 girls joined a single club
3 girls joined both clubs.
 = 17+(3)2=23
In this problem, Supposed if every girl only joined a single club; to find the number of girls who joined both clubs, Subtract any number from the total number of recruited girls which will make the total number of recruited club members to 20. The answer is 3.
This kind of solution may only be applicable to this type problem which has 2 clubs, I think.