You have a total of $\$100$. You do not have to bet all $\$100$, and your bets must be whole numbers.
Team A faces team B — A wins with probability $0.7$
Team C faces team D — C wins with probability $0.25$
Betting odds:
Team A — $2:7$
Team B — $3:1$
Team C — $7:2$
Team D — $1:3$
where $2:7$ odds means that if you bet $\$7$ on A, if A wins, then you get the $\$7$ back plus $\$2$ of profit, and if A loses, you lose the $\$7$.
My thinking was that I calculated some expected gain for each one of the teams, eventually seeing that C was the best deal. So then I put $\$50$ in C and $\$50$ in D. I am not entirely sure how to actually do this problem though and any help would be appreciated!!
Your "optimal" betting strategy depends on exactly what it is that you want to optimise. A common choice for betting situations like this is to bet on the option which gives the highest expected winnings, provided that's positive, and not bet at all if there's no option with positive expected winnings. According to my calculations, your expected winnings per dollar staked on each of the teams are: \begin{array}{ll} \text{team A:}&0.7\times\frac{2}{7}-0.3=-0.1\\ \text{team B:}&0.3\times\frac{3}{1}-0.7=0.2\\ \text{team C:}&0.25\times\frac{7}{2}-0.75=0.125\\ \text{team D:}&0.75\times\frac{1}{3}-0.25=0 \end{array} Thus, betting on team A is a losing proposition, so you shouldn't touch that bet with a barge pole. Your expected winnings per dollar is greatest for a bet on team B, so if your expected winnings is what you want to maximise, you should place the whole of your $\ \$100\ $ on team B, when your expected winnings will be $\ \$20\ $.
The odds for the game between C and D, however, constitute what is known as a Dutch book, meaning that (as long as your bookie doesn't go broke before you collect) you can guarantee that you win by placing appropriately size bets on both C and D. So if you're risk averse, you might well prefer to place a combination of bets on B, C and D which will guarantee that you win (or a least, that you can't lose) but still give you a satisfactory level of expected winnings (which will, of necessity, be strictly positive).
If you place a proportion $\ y\ $ of your stake on $\ B\ $, a proportion $\ x\ $ of it on C, and the rest, $\ 1-x-y\ $, on D, then the amount you will win for each possible combination of winning teams is given in the following table: \begin{array}{c|c} \text{winners}&\text{amount won}\\ \hline \text{A and C}&\frac{7x}{2}-y-(1-x-y)=\frac{9x}{2}-1\\ \text{A and D}&\frac {1-x-y}{3}-x-y=\frac{1-4x-4y}{3}\\ \text{B and C}&3y+\frac{7x}{2}-(1-x-y)=4y+\frac{9x}{2}-1\\ \text{B and D}&3y+\frac {1-x-y}{3}-x=\frac{8y}{3}-\frac{4x}{3}+\frac{1}{3}\ . \end{array} Note that the third and fourth of these quantities exceed the first and second, respectively, by $\ 4y\ $, which must always be non-negative. All of them will therefore non-negative as long as \begin{align} \hspace{-3em}\text{(i)}\hspace{3em}&\frac{2}{9}\le x\ \ \text{ and}\\ \hspace{-3em}\text{(ii)}\hspace{3em}&y\le\frac{1-4x}{4}\ , \end{align} and they will all be strictly positive whenever both these inequalities are strict. The amount you're guaranteed to win is $$ g=\min\left(\frac{9x}{2}-1,\frac{1-4x-4y}{3}\right)\ , $$ and your expected gain is \begin{align} e=\frac{x}{8}+\frac{y}{5}\ . \end{align} The requirement that you bet only whole numbers of dollars means that $\ x\ $ and $\ y\ $ must be integer multiples of $\ \frac{1}{100}\ $. The only such pair, $\ (x,y)\ $, of multiples that satisfy inequalities (i) and (ii) are $\ \left(\frac{23}{100},0\right)$,$\left(\frac{23}{100},\frac{1}{100}\right)$,$\left(\frac{24}{100},0\right)$,$\left(\frac{24}{100},\frac{1}{100}\right)$ and $\left(\frac{25}{100},0\right)$. The first of these maximises $\ g\ $, while the fourth maximises $\ e\ $.
Thus, if you want to maximise the amount you're guaranteed to win you should bet $\ \$23\ $ on C and $\ \$77\ $ on D. You will then win $\ \$3.5\ $ whenever C wins, or $\ \$\frac{8}{3}\ $ whenever D wins, and you're guaranteed of winning at least this latter amount. You're expected winnings, however, will only be $\ \$\frac{23}{8}\ $.
If you want to maximise your expected winnings while still guaranteeing that you don't lose, you should bet $\ \$1\ $ on B, $\ \$24\ $ on C and the remaining $ \$75\ $ on D. The amounts you will win for each of the four possible outcomes are given in the following table, \begin{array}{|c|c|c|} \text{B}&\text{C}&\text{amount won}\\ \hline \text{win}&\text{win}&\$12\\ \text{win}&\text{lose}&\$4\\ \text{lose}&\text{win}&\$8\\ \text{lose}&\text{lose}&\$0\\ \hline \end{array} and your expected winnings will be $\ \$3.2\ $. There is, however a greater than $\ 50\%\ $ chance (specifically, a probability of $\ \frac{21}{40}\ $) that you will only break even.