A Training-free LLM Framework with Interaction between Contextually Related Subtasks in Solving Complex Tasks