Challenge: find the order of an element in a Finite Abelian Group with a given presentation

Let $$a, b, c, d, e, f, g$$ denote integers, with $$a$$ and $$c$$ both non-zero, and consider the matrix

$$M=\left(\begin{matrix} a&b&d&f \\ 0&c&e&g \end{matrix}\right)$$

Let $$G$$ be the quotient of the group $$\Bbb Z^2$$ by the column space of $$M$$. That is, $$G$$ is presented by two generators, say $$x,y$$, which commute, and which satisfy the four relations $$ax=0$$, $$bx+cy=0$$, $$dx+ey=0$$, $$fx+gy=0$$.

What is the order of $$x$$ in $$G$$, in terms of $$a, b, c, d, e, f, g$$?

This question is a challenge because I have an answer (in fact, I have two approaches that yield the same answer). The point of asking is that this problem has a huge teaching/learning potential, and to see whether there could be yet another approach.

Hint: the problem is elementary if you remove the last two columns. There is a twist if you add $$d\choose e$$, and yet quite another twist if you add the last column. Then, adding more columns would not make the problem more interesting. In fact, the problem given with a $$2\times 4$$ matrix as above is essentially as difficult as the same problem given with an arbitrary matrix.

• If you are looking for a third approach, it would help us help you if we had any idea what the first two are. Jul 31, 2019 at 14:02
• @Arthur The main point of my question is to let you have fun, because it was a lot of fun to me. Whether there is another approach is of course interesting to me, but I'm in no rush to find out. Jul 31, 2019 at 14:05
• So it's posed as a challenge / puzzle. Fair enough. I just read it as you mainly looking for the third approach, hence my comment. Jul 31, 2019 at 14:08
• @Arthur No worries. I'll add a spoiler box with my solutions later on if noone finds anything. Jul 31, 2019 at 14:15