If I have a charge $Q$ located over a 2 layer dielectric as represented:

According to the image method: the charge $Q'1$ will be located at a distance $h_1$ under the first interface and the $Q'2$ will be located at a distance $h_2$ under the first interface.
With:
$$ Q'1 = \frac{\epsilon_0-\epsilon_1}{\epsilon_0+\epsilon_1} = \frac{1-5}{1+5} Q $$
My problem is determining the value of $Q'2$, is it: $$ Q'2 = \frac{\epsilon_1-\epsilon_2}{\epsilon_1+\epsilon_2} = \frac{5-100}{5+100} Q $$
or
$$ Q'2 = \frac{\epsilon_0-\epsilon_2}{\epsilon_0+\epsilon_2}= \frac{1-100}{1+100} Q $$