Optimizing workers' mental states has been identified as a key factor in enhancing work performance and achieving workplace benefits. Factors such as office design and work dynamics (i.e. individual vs. collaborative) play a crucial role in influencing workers' mental states and behavior. However, the interplay of these elements is often overlooked. This study introduces a mixed reality approach to investigate the effects of office design and work dynamics on cognitive performance and mental states. The independent variables were defined as preferred and non-preferred indoor spaces, combined with individual and collaborative work dynamics. Four experimental scenarios were created to assess their impact on workers' mental states and cognitive performance. Thirty participants performed individual (memory and executive function) and collaborative (creativity and reasoning) tasks in both preferred and non-preferred spaces. Electroencephalographic and cognitive performance data were collected during the experiments. The findings showed that indoor office design did not significantly influence individual cognition, memory, or executive function. However, creativity and mental stress increased in preferred spaces, while reasoning improved in non-preferred environments. Additionally, individual tasks heightened mental workload, whereas collaborative work increased mental stress. These findings, enabled by the immersive and controlled conditions in mixed reality, highlight the importance of aligning office design according to work dynamics to support performance enhancement and mental well-being. This study demonstrates the potential of mixed reality as a tool to facilitate user experience for workspace research and design in advance.