Mastering ReAct Agents: Deep Dive into AI Reasoning