The brain activity during cooperation as a form of social process is studied. We investigate the relationship between coinstantaneous brain-activation signals of multiple participants and their cooperative-task performance. A wearable near-infrared spectroscopy (NIRS) system is used for simultaneously measuring the brain activities of two participants. Each pair of participants perform a cooperative task, and their relative changes in cerebral blood are measured with the NIRS system. As for the task, the participants are told to count 10 s in their mind after an auditory cue and press a button. They are also told to adjust the timing of their button presses to make them as synchronized as possible. Certain information, namely, the "intertime interval" between the two button presses of each participant pair and which of the participants was the faster, is fed back to the participants by a beep sound after each trial. When the spatiotemporal covariance between the activation patterns of the prefrontal cortices of each participant is higher, the intertime interval between their button-press times was shorter. This result suggests that the synchronized activation patterns of the two participants' brains are associated with their performance when they interact in a cooperative task.