I am trying to understand Maximum Likelihood Estimation, and am confused by the following problem:
There are 2 slot machines. You can win \$20 with machine A with probability of $\theta$. Machine B has 4 times higher probability of winning, with just one forth of dividend. Suppose you played 10 times with either of machine A or B, and the result was as follows. What is the maximum likelihood estimation of $\theta$?
I tried to approach this problem by finding the likelihood function, which I got as:
$\prod_{i}^{10} P(A)^{n} P(1 - A)^{1 - n}$
$\theta^2 (1-\theta)^0 (4\theta)^3 (1 - 4\theta)^5$
But I don't know how to proceed from here. I also know that the answer is $\frac{1}{8}$, but don't know how to reach it correctly with the steps.

Take the derivative of the function $\theta^5 (1 - 4\theta)^5$, which is $5 (1 - 4 \theta)^5 \theta^4 - 20 (1 - 4 \theta)^4 \theta^5$, and set equal to zero since at the maximum point, the likelihood function has a zero slope. We can verify that $\theta=1/8$ and $\theta=1/4$ gives you zero slope. Also, take the second derivative and verify that it is negative only at $\theta=1/4$. Plot the function to see what is happening.