Had a play in excel using solver, but basically;

You want to invest as much as possibly in the Unit trusts, where the maximum you can invest is 45000 (limited by the fact that investment in unit trusts must not exceed investments in FTSE shares).

So you invest 25000 in trust A since it returns the highest level, then the remaining 20000 in trust B since it is the second highest.

You then must invest 45000 in shares in order for the condition above to hold, so you invest it all in Share B since its return is higher then that of A.

So that leaves 40,000 to invest, which all goes into the Gilts and ensures the condition that you invest at least as much in Gilts as you do in Unit Trust A, or share A. So the portfolio is;

Unit Trust A: 25000

Unit Trust B: 20000

Share A: 0

Share B: 45000

Gilts: 40000

SO total return on this portfolio is