Finding the number of triangles
The total number of points are (m+n+k) which give m+n+kC3 triangles but m points lie on line l1, n points lie on line l2 and k points lie on line l3, taking 3 points at a time which gives mC3, nC3 and kC3 combinations which produce no triangle.
Hence, the required number of triangles is
m+n+kC3− mC3− nC3− kC3
Hence, the option (B) is correct.