
I have not idea where to start with this question can someone point me in the right direction...

I have not idea where to start with this question can someone point me in the right direction...
On
There will be symmetries that make the work easier: once you have found the first three probabilities, you will know the last three. And because of the symmetry, you will not even need the probabilities to find $E(X)$.
As an example, let us calculate $\Pr(X=5)$. There are $\binom{10}{5}$ equally likely ways to place the math majors. To have the median of the math majors equal to $5$, we choose $2$ of the first $4$ places to put a math major, and $2$ of the last $5$ places. This can be done in $\binom{4}{2}\binom{5}{2}$ ways.
Thus $\Pr(X=5)=\dfrac{\binom{4}{2}\binom{5}{2}}{\binom{10}{5}}$.
The calculations for $X=3$ and $X=4$ are very similar, and symmetry takes care of $6,7,8$.
Hint: if the median position of the math majors is $i$, $2$ math majors have to be placed in the $i-1$ positions below $i$ and the remaining $2$ have to be placed in the $10-i$ positions above $i$.
The probability that the median is $i$ is the product of the numbers of ways of doing these two things, divided by $10!$ for the total number of equally probable possibilities.
If $p_j$ is the probability that $X=j$, the mean of $X$ is $\sum_{j=3}^8 j\times p_j$, which you can easily do after the first part.