This study employed fNIRS- and EEG-hyperscanning to investigate the effects of task sharing, social presence, and mental workload on intra- and inter-brain functional connectivity, and neurophysiological responses of dyads during a dual n-back task. The findings indicated a positive correlation between the n-back level and reaction times, heart rate, and PFC oxygenation, whereas task accuracy and heart rate variability decreased with difficulty. The effect of social presence was smaller than the effect of task difficulty, suggesting a lower level of mental workload during the social condition, possibly due to social facilitation. In the social condition, inter-brain connectivity tended to decrease as task difficulty increased, indicating that partners could monitor each other's actions to the extent that task demands allowed. The intra-brain connectivity analysis showed a larger difference between individual and social sessions compared to the difference between own and co-actor's go trials in the social session. Overall, the EEG- and fNIRS-hyperscanning measures obtained during a dual n-back task in this study provide evidence regarding the differential modulation of inter- and intra-brain functional connectivity due to the co-presence of another actor responding to the same stimulus to pursue a different goal and changes in task difficulty.