The number of straight lines that can be formed by joining 10 points no three of
which are in the same straight line except 7 of them which are in the same
straight line, is
Suppose the 7 points points A through G are in the same straight line.
That's 1 straight line.
Suppose H, I, J, are not, and that no three other than A through G are
in a straight line.
We can connect the 3 points that aren't in a straight line three
ways, HI, HJ, and IJ.
That's 3 more straight lines.
We can connect H and each of the 7 points A through G
That's 7 more straight lines
We can connect I and each of the 7 points A through G
That's 7 more straight lines
We can connect J and each of the 7 points A through G
That's 7 more straight lines.
Total 1+3+7+7+7 = 25 lines
Edwin