The appropriate answer is C. Both are formed by gravitational forces. The first picture shows an elliptical galaxy. These galaxies can be round, nearly spherical or flattened disks. They contain very little dust or gas and the stars contained here are older than stars in other galaxies. The second picture shows a spiral galaxy that has a center made up of a thick mass of material and has flattened arms that rotate around the center.
Galaxies are formed from the gravitational pull of massive objects in space. Some galaxies from around super massive black holes (spiral) or a group or collection or cluster of stars.