Logistic Regression - Likelihood estimation and Loss

How did you combine the two probabilities P(y=1|x;theta) = htheta(x) and P(y=0|x;theta) = 1- h(theta)x into a combined equation to explain the maximum likelihood ? [Time : 08:00 in video ]