While we apply prim algo, it always gives connected graph.
option 1: (a,b),(b,c),(a,d),(e,f){here it get disconnected},(d,g),(c,e)
option 2: (g,f),(f,c),(g,d),(c,e),(d,b),(d,a) {always connected}
option 3: (c,f),(c,e),(e,d),(a,b){here it get disconnected},(d,g),(b,c)
hence, option 2 is correct.