The correct option is D 510
Let x,y,z be the friends and a,b,c denote that case when x is
invited a times, y is invited b times, and z is invited c times.
Now, we have the following possibilities:
(a,b,c)=(1,2,3) or (3,3,0) or (2,2,2) [grouping of 6 days of week]
Hence, the total number of ways is
6!1!2!3!3!+6!3!3!2!3!+6!(2!2!2!)3!3!
=360+60+90=510