Here you can get as technical as you want but a basic ideology here is:
- each portfolio has a rate of return: R
- the R is calculated (at a high level) as a weighted average of the different $(i) amounts invested into a set of different investments {x, y, z, etc} and the probability(i) of each being successful with an individual rate of return R(i). It's a function of free cash flow and covariance of the FCF relative to other investments (e.g. a "balanced risk" porffolio will be solar vs coal because they have a positively correlated covariance - one goes down, other goes up, assuming the probability / risk of each succeeding is the same of course - called market beta).
- your investment into 1-2 firms depends on whether they add or remove risk from the portfolio while maximising the overall rate of return.
The above are the high-level basical structural discussions you can have. I don't remember the math beyond that but those are not what you'd be asked to do in a case anyway. Be sure you understand the logic you are using and the rest should follow.
Hemant