Compute the product of cycles that are permutations of $S_8$ Here is the product of cycles. My textbook goes right to left multiplication. $$(1,4,5)(7,8)(2,5,7)$$
An observation here is that I don't think these cycles are disjoint and therefore they are not commutative. So far I have only done calculations with disjoint cycles so I wasn't sure how to handle this. 
I calculated the permutation to be after writing the cycles out in table notation. 
$$\sigma = 
\begin{pmatrix}
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\
4 & 1 & 3 & 5 & 8 & 6 & 2 & 7
\end{pmatrix} $$
However, if I inverse the process and split $\sigma$ into cycles, I get 
$$(1,4,5,8,7,2)$$
Is it because I am not multiplying product of disjoint cycles that I am not able to inverse the equation? Am I just doing this completely wrong?
 A: Your answer is correct! 
What seems to be bothering you is that here is more than one way to write a permutation as a product of cycles, but this is just true. The fact that your permutation can be written as one cycle $(145872)$ in no way implies that it can't be written as the product of 3. (It's true that the "disjoint cycle" decomposition is unique up to moving the factors around, but most cycle decompositions are not unique.)
A: Perhaps I should expand my comment.
You have $(145)(78)(257)$. 
We can write this in disjoint cycles at sight.
We start
$$
(1??
$$
Well under the right cycle $1\mapsto 1$ and then under the middle cycle $1\mapsto 1$ then under the left cycle $1\mapsto 4$. So we have
$$
(14??
$$
Then under the right cycle $4\mapsto 4$ and then under the middle cycle $4\mapsto 4$ then under the left cycle $4\mapsto 5$. So we have
$$
(145??
$$
Then under the right cycle $5\mapsto 7$ and then under the middle cycle $7\mapsto 8$ then under the left cycle $8\mapsto 8$. So we have
$$
(1458???
$$
Then under the right cycle $8\mapsto 8$ and then under the middle cycle $8\mapsto 7$ then under the left cycle $7\mapsto 7$. So we have
$$
(14587??
$$
Then under the right cycle $7\mapsto 2$ and then under the middle cycle $2\mapsto 2$ then under the left cycle $2\mapsto 2$. So we have
$$
(145872??
$$
Then under the right cycle $2\mapsto 5$ and then under the middle cycle $5\mapsto 5$ then under the left cycle $5\mapsto 1$. So we are back home, and have
$$
(145872)
$$
Are there any more? Yes, there's 3, so we have
$$
(145872)(3???
$$
None of the cycles moves $3$ so we are back home and have
$$
(145872)(3)
$$
But are there any more? Yes, $6$. So we have
$$
(145872)(3)(6??
$$
None of the cycles moves $6$ so we are back home and have
$$
(145872)(3)(6)
$$
Are there any more? No, so we are done, Whew!
Note We don't write any of this down, we just fill out the answer one by one as explained. 
Note For inverses we just write the cycles in reverse order once we have a permutation in disjoint-cycle form. 
