A financier plans to invest up to $400,000 in two projects. Project A yields a return of 11% on the investment of x dollars, whereas Project B yields a return of 15% on the investment of y dollars. Because the investment in Project B is riskier than the investment in Project A, the financier has decided that the investment in Project B should not exceed 35% of the total investment. How much should she invest in each project to maximize the return on her investment P in dollars?