let the common difference be d;
then we have :-
m + m + d + m + 2d = 21 giving 3(m+d) = 21 and m +d = 7
m(m+d)(m+2d) = 315 giving 7m(m + 2d) = 315 and 7m(d + 7) = 315
m + d = 7
7md + 49m = 315
Substitute d = 7 - m in the second equation:-
7m(7 - m) + 49m = 315
49m - 7m^2 + 49m = 315
7m^2 - 98m + 315 =0
7 (m^2 - 14m + 45) = 0
7(m - 5)(m - 9) = 0
m = 5 or 9 and d = 7 - m = 2 or -2
Try m = 5 then the sequence is 5 , 5+2 , 5+4 = 5 , 7 , 9
5 + 7 + 9 = 21 so m must be 5
and greatest number k = 5 + 2(2) = 9 Answer