The phasor diagram of a synchronous machine connected to an infinite bus is shown in the figure below. The machine is acting as, 
For a synchronous machine tied to an infinite bus, whether it behaves as a generator or a motor, and whether it runs at a leading or lagging power factor, can be read directly off the relative position of the induced emf \(E\) and the terminal voltage \(V\) in the phasor diagram, together with the excitation level. In the given diagram \(E\) is drawn leading \(V\), which is the defining signature of generator action, and \(E\) leads by a large enough angle to indicate over-excitation.
Reading the diagram this way confirms the machine is delivering power (generator action, \(E\) leading \(V\)) while over-excited (large lead angle), which together mean it is supplying reactive power at a lagging power factor.
Therefore, the correct answer is generator operating at lagging p.f.