Portfolio P weights (Treynor Black)

Once you have the weights of the actively managed portfolio A, how do you go about figuring out how much to allocate to portfolio A and how much to portfolio M to form portfolio P? Schweser says that portfolio P maximizes the Sharpe ratio… But how, in practice, do you figure out the weights of A and M to maximize Sharpe ratio? Thanks D. EDIT: sorry I should have posted this in Level 2 forum…