Glad to help you get out of notation heck.
First, you may be puzzled about what $f_X(x)$ means. It is just the writer's way of saying "the probability distribution function for the random variable $X$, evaluated when $X$ is $x$. Let's give an easy example:
Say that $X$ has a range of $0$ to $1$ and on that range, the pdf is $2x$. That is, it is very unlikely that $x$ will be near to zero, where the pdf is very small, and the most likely values will be near to $1$. In that case, we would say that $$f_x(x) = 2x$$
Now for the "d" in the formula -- actually, that is part of a math notation $dx$ which stands for a very tiny change in $x$. If you have had some calculus experience, you will be familiar with notations like
$$
\int_a^b x^2 \, dx = \frac13 (b^3 - a^3)$$
If you have not had any differential calculus experience, you won't understand the notations used when talking about pdf's or cumulative distribution functions.
Finally, let's try to understand the whole equation. It says that the probability that the variate $X$ is between $b$ and $a$ is given (in our example) by
$$ \int_a^b 2x \, dx $$
where that $2x$ is the pdf or $X$ at the point $x$.
This integral turns out to have value
$$\int_a^b 2x \, dx = (b^2-a^2)$$
And you can see that the probability that $0 \leq X \leq 1$ is $1^2 - 0^2 = 1$ which is comforting -- we knew $X$ had to be in that range. What we can learn from this is that not every possible function is usable as a pdf; if we had chosen $f_X(x) = 3x$ instead, the "normalization" would be wrong, and that comforting property would not hold true.
As a meatier exercise, what would the probability that $X \leq \frac12$ be?
Well, $$\left( \frac12 \right)^2 - 0^2 = \frac{1}{4}$$
If there are $k$ lines not in use, then it is the same as $6-k$ lines being in use.
If between $2$ and $4$ lines, inclusive, are not in use, then that is the same as between $2$ and $4$ lines, inclusive, being in use. ($2$ lines not being in use is the same as $4$ lines being in use, etc.)
If at least $4$ lines are not in use, then this is the same as at most $2$ lines being in use.
Best Answer
Fortunately, the scenarios are in increasing order of profit for both investments. This simplifies matters.
If the profits under scenario $i$ are denoted by $p_i$, then the PDF (or more accurately, the probability mass function, or PMF) of the profit is simply given by the scenario probability distributions:
$$ f(p_i) = P(\mbox{scenario } i) $$
For instance, if $p_i = 10i$ ($p_1 = 10, p_2 = 20, p_3 = 30, \ldots$), then the PMF would be given by
$$ f(10) = 0.10 \\ f(20) = 0.20 \\ f(30) = 0.15 \\ f(40) = 0.25 \\ f(50) = 0.30 $$
from the scenario probabilities given in the problem statement. Of course, the profits for Investments $A$ and $B$ are different, so the PMF will be different, too.
Then the CDF is just the probability that the profit is less than or equal to the given amount. For the fictional case I just gave, it would be
$$ F(x) = \begin{cases} \hfill 0.00 \hfill & x < 10 \\ \hfill 0.10 \hfill & 10 \leq x < 20 \\ \hfill 0.30 \hfill & 20 \leq x < 30 \\ \hfill 0.45 \hfill & 30 \leq x < 40 \\ \hfill 0.70 \hfill & 40 \leq x < 50 \\ \hfill 1.00 \hfill & x \geq 50 \end{cases} $$
where the CDF values are determined as running totals of the PDF values. You will, of course, have different cutoff points, depending on the profit profile of the particular investment.