profit / standard derivation calculation $$\begin{array}{c|c|c|} 
 & \text{Stock A} & \text{Stock B} \\ \hline
\text{ Profit} & 14 \%  & 21\% \\ \hline
\text{standard deviation} &  15\% & 26\% \\ \hline
\end{array}$$
Lets suppose we have investor who wants to invest into company A 30% and into company B 70% of his money.
Question A: What is expected profitability?
Question B: What is lowest and highest risk of this portfolio?
Answer A: $$0,3\times x \times (0,14+1)=0,342$$
$$0,7\times x \times (0,21+1)=0,847$$
$$0,342x+0,847x=1,189x$$
I think that this is correct but I dont know if I should take into consideration risk. And second question, should I just subtract risk percentage?
Thanks for help
Edit: I edited previous post, deleted post and reposted
 A: Let $X$ the invested money and $p$ the the profit rate. Then the profitabiliy  is
$$\textrm{profitability}=\frac{(1+p)\cdot X-X}{X}=\frac{(1+p-1)\cdot X}{X}=p$$
Then let $p_A$ be the random variable for the profit in percentage (profitability) of company $A$. Similar definition for $p_B$. And we have also the weights of investments into the companies $A$ and $B$: $w_A, w_B=1-w_A$. The the expexted profitability is
$$\mathbb E(p)=\mathbb E(w_A\cdot p_A+w_B\cdot p_B)=w_A\cdot \mathbb E(p_A)+w_B\cdot \mathbb E(p_B)=0.3\cdot 0.14+0.7\cdot 0.21=0.189$$
So we don´t need neither an extra $1$ nor an $x$, but the you was in the right direction. The risk of investment can be measured in terms of variances or standard deviations. So we have
$Var(w_A\cdot p_A+w_B\cdot p_B)=w_A^2\cdot Var(p_A)+w_B^2\cdot Var(p_B)+2\cdot w_A\cdot w_B\cdot \rho\cdot \sigma_A\cdot \sigma_B$
$\rho$ is the correlation coefficient of $p_A$ and $p_B$. The domain is between $-1$ and $1$. $\sigma_A,\sigma_B$ are the corresponding standard deviations. So the minimum risk (variance) of the profitability is
$$Var(p)=w_A^2\cdot Var(p_A)+w_B^2\cdot Var(p_B)-2\cdot w_A\cdot w_B\cdot \sigma_A\cdot \sigma_B$$
And the maximum risk (variance) of the profitability is
$$Var(p)=w_A^2\cdot Var(p_A)+w_B^2\cdot Var(p_B)+2\cdot w_A\cdot w_B\cdot \sigma_A\cdot \sigma_B$$
Can you proceed?
