Having a sequence of gears connecting the driving and driven gears that all mesh in the same plane will produce a gear ratio independent of the intermediate gears: the gear ratio will be the number of teeth on the driven gear divided by the number of teeth on the driver gear. The following image shows this type of arrangement (not all teeth are shown):
Note that this is also the case for arrangement 2 because, even though there exists a gear out of plane, all of the gears involved in transmitting rotation from driver to driven all lie in plane.
However, whenever you have rotation transmitted from one gear to a gear of a different size via a shaft, as is the case for the cluster gear in arrangement 1, the gear ratio does depend on the intermediate gears.
"IN-PLANE" GEAR TRAIN
The reason why the gear ratio is independent of intermediate gears for a simple chain is because all the meshing gears have the same circumferential speed (to be more precise, the tangential speed of a gear at its pitch circle): any two meshing gears must have the same circumference speed, and this extends to all the gears because they all lie in plane.
In the above diagram, I use the following notation: $V$ is the circumferential speed, $\omega_D$, $\omega_d$ are the angular velocities and $r_D$, $r_d$ are the pitch circle radii for the driving (D) and driven (d) gears respectively.
Given $V$ is the same everywhere in an in-plane gear train, it can be shown that, according to kinematics:
$$V = \omega_D r_D = \omega_d r_d$$
And so the (reduction) gear ratio is:
$$G = \frac{\omega_D}{\omega_d} = \frac{r_d}{r_D} \implies G = \frac{N_d}{N_D}$$
$N_D$ and $N_d$ are the number of teeth on the driving and driven gears respectively.
And so it can be seen that the gear ratio is indeed independent of the intermediate gears.
COMPOUND GEAR TRAIN
For gear trains like in arrangement 1, where at least one pair of gears involved in transmission motion are linked by a shaft, the circumferential speed is not the same everywhere:
In the above, by kinematics:
$$\omega = \frac{V_1}{r_1} = \frac{V_2}{r_2} \rightarrow r_1 \ne r_2 \implies V_1 \ne V_2$$
Instead, to determine the gear ratio of such a system, it helps to consider gear ratios of sub-systems consisting of only in-plane gear trains:
In the above diagram, there are two sub-systems of in-plane gears: the lower set and the upper set. Consider the lower set of gears having its own gear ratio, noting that all the gears in this set are in-plane:
$$G_1=\frac{\omega_D}{\omega_1}=\frac{N_1}{N_D}$$
Similarly, for the upper sub-system of gears:
$$G_2=\frac{\omega_1}{\omega_d}=\frac{N_d}{N_2}$$
Therefore, the overall gear ratio can be determined:
$$G = \frac{\omega_D}{\omega_d}=\frac{\omega_D}{\omega_1} \frac{\omega_1}{\omega_d} = G_1 G_2$$
Therefore, it can be shown that for a compound (out-of-plane) gear train, the gear ratio is equal to the gear ratios of in-plane sub-systems all multiplied together.