A couple of things here:
If there's no "
=" sign, then this cannot be an equation and thus cannot necessarily be treated as though it is one. Take the following, by your logic:
2≠-2 => 2^2≠(-2)^2
Which is, of course, nonsense because this isn't an equation so you can't carry out most of the usual operations and still expect the result to hold.
What you're saying here is that
y=x−1yx⟹yn=x−1ynx. This statement is logically equivalent to the statement
yn=x−1ynx⟹y=x−1yx [since]. Why would you expect this equivalent statement to be true? As you should know, you can't "nth root" elements of groups in such equations so you should instinctively expect that claim to be false at first glance.
In this case, you're saying that "if two elements in a finite group are not the same thing, then they cannot have the same order" (note that your argument extends to any finite group with an element of order n [and beyond, in fact, but that's irrelevant] rather than simply D_(2n) because the only property you've used here is that y^n=e) or equivalently "if two elements of a finite group have the same order, then they must be the same". When said that way, alarm bells should be ringing as that can't possibly be true by countless counterexamples (C_3, Klein-4, Q_8 etc).
Broadly speaking, working with 'non-equalities' (for want of a better phrase) is often a bit useless/awkward as it doesn't usually give you a great deal of information
in that form.
The relations are the three equations given in Mark's post. To say f is trivial on the relations is to say that it carries over the way in which the elements are combined in D_(2n) to the group G.