Finding the order of permutations in $S_8$
So take $\sigma = (4,5)(2,3,7)$. The order, by definition, is the the smallest natural number $n$ such that $\sigma^n = (1)$ (i.e. the identity element in the group, i.e. the element that sends every number to itself). Since the cycles $(4,5)$ and $(2,3,7)$ are disjoint you have
$$\begin{align} \sigma^n &= (4,5)(2,3,7)(4,5)(2,3,7)\dots (4,5)(2,3,7)(4,5)(2,3,7)\\ &= (4,5)(4,5)\dots (4,5)(4,5)(2,3,7)(2,3,7)\dots (2,3,7)(2,3,7)\\ &= (4,5)^n(2,3,7)^n \end{align}$$
(note that the two elements $(4,5)$ and $(2,3,7)$ commute).
So the order of $\sigma$ is exactly the smallest natural number $n$ such that $(4,5)^n = (1)$ and $(2,3,7)^n = (1)$ (think about this fact for a moment).
But what is the order of a each of $(4,5)$ and $(2,3,7)$?
Well, the order of $(4,5)$ is two exactly because $(4,5)^2 = (4,5)(4,5) = (1)$. The order of $(2,3,7)$ is $3$ because $$\begin{align} (2,3,7)^1 &= (2,3,7) \\ (2,3,7)^2 &= (2,7,3) \\ (2,3,7)^3 &= (1) \end{align} $$
Now it is not to hard to see that the order of $\sigma$ is exactly the least common multiple of $2$ and $3$ (since we need both $(4,5)^m = (1)$ and $(2,3,7)^m = (1)$ and the smallest $m$ where this happens is exactly the least common multiple). Hence the final answer is $6$.
Addendum: I just wanted to add a bit about orders of these elements. First note that for example the element $(4,5)$ is just the element $$ (4,5) = \begin{pmatrix} 1 & 2 &3 & 4 & 5 & 6 & 7 & 8 \\ 1 & 2 & 3 &5 & 4& 6 & 7 & 8 \end{pmatrix}. $$ (Hence $4$ maps to $5$ and $5$ to $4$). So when you compose (multiply) the element with itself, then you get $$ \begin{align} (4,5)(4,5) &= \begin{pmatrix} 1 & 2 &3 & 4 & 5 & 6 & 7 & 8\\ 1 & 2 & 3 &5 & 4& 6 & 7 & 8 \end{pmatrix}\begin{pmatrix} 1 & 2 &3 & 4 & 5 & 6 & 7 & 8\\ 1 & 2 & 3 &5 & 4& 6 & 7 & 8 \end{pmatrix} \\ &= \begin{pmatrix} 1 & 2 &3 & 4 & 5 & 6 & 7 & 8\\ 1 & 2 & 3 &4 & 5& 6 & 7 & 8 \end{pmatrix} = (1) \end{align} $$ (I usually write the identity as $(1)$).
This means that the order of $(4,5)$ is $2$. Likewise you find that $$ (2,3,7) = \begin{pmatrix} 1 & 2 &3 & 4 & 5 & 6 & 7 & 8\\ 1 & 3 & 7 &4 & 5& 6 & 2 & 8 \end{pmatrix}. $$