The idea is that given any two of (m,epsilon,delta) you can get the value of the third (as a function of the two), for which it will hold that:
P[|error(h) - beta| > epsilon] < delta
What you showed in class is that:
P[error(h(ERM)) - beta > epsilon] < 2|H|e^{-m*epsilon^2/2}
Now you are given delta and m, and you want to find epsilon such that the RHS is less than delta, which leads to: epsilon> sqrt{2ln(2H/delta)/m}.
So as long as you take epsilon like that the inequality will hold. In particular it will hold for epsilon = sqrt{2ln(2H/delta)/m}.
Hope this is clearer.
Amir