The simplest approach is the best approach to solve this question. If we take a=2 and b=2, we can practically count the number of triangles we can form. Whichever option corresponds to this number, when we plug in the values of a and b, should be the answer.
The diagram, corresponding to the question should look like this:
Attachment:
13th June 2019 - Reply 2.JPG [ 13.96 KiB | Viewed 2401 times ]
Let us name the two points on P1 as 1 and 2; let the points on P2 be 3 and 4. Then, the possible triangles are:
1-3-4, 2-3-4, 1-2-3 and 1-2-4.
So, we have a total of 4 triangles.
When we plug in the values of a and b in option A, we get 6; so option A is not the right answer. When we carry on in a similar fashion, we can eliminate options B, C and E. Option D is the right answer.
Of course, this question can also be solved using the method of combinations, as highlighted by the other experts on this thread. For those of you who are not able to think of that method, taking values is more viable, as we have shown.
Hope this helps!