In the sentence "She has eaten two apples", "has" is the helping verb (also called an auxiliary verb). It is used to help form the present perfect tense of the main verb "eaten".
The main verb "eaten" is a past participle, and "has" is the auxiliary verb that helps form the present perfect tense.
The improved sentence would be: "Had you been careful, you could have avoided the accident."
This is a conditional sentence, and "had" is the correct auxiliary verb to use in the if-clause (instead of "have" or "had have"). The sentence is expressing a hypothetical situation, and "had you been" is the correct way to form the conditional perfect tense.
The correct sentence would be: "What did you do last week?"
This is a question in the past tense, asking about an action that was completed in the past (last week). The verb "did" is the correct form of the verb "do" in the past tense, and it is followed by the base form of the verb "do" (which becomes "do" instead of "does" because it's a question).