Need 3 points for a triangle, but only 2 points can be collinear. Setting that issue aside for the moment, 3 points can be selected
16!/13!3! = 560
That's the maximum number of triangles, but we know a bunch won't work because some of the groups of 3 will lie on the same line. But we can eliminate C,D,E as answers.
Now we need to identify the number of sets of 3 points that lie on a line and subtract.
Each row and column has 4 points. 3 points can be selected from each
4!/3!1! = 4. Since there are 8 rows and columns, this eliminates 32.
But we have major and minor diagonals also that are lines.
The two major diagonals have 4 points each, so by the logic above this eliminates another 8.
Each major diagonal has a minor diagonal on either side comprising 3 points each.
3 points can be selected from 3
1 way, multiplied by 4 minor diagonals eliminates another 4.
Total number of 3 point sets to be eliminated is 32+8+4=44
Total number of triangles = 560-44=516,A