in career mode, just before launching a new race, you have choice of difficulty and length of race. Edit difficluty, you can either choose predefined level (in that case, choose expert and you will get ai legend), or edit each part of difficluty, tyre, fuel consumption... at the botton of the list, you have AI Level: choose LEGEND. That's it...