This riddle comes from a book entitled "The American Tutor's Assistant", dated 1791.

When first the marriage knot was ty’d
Between my wife and me,
My age was to that of my bride
As three times three to three
But now when ten and half ten years,
We man and wife have been,
Her age to mine exactly bears,
As eight is to sixteen;
Now tell, I pray, from what I’ve said,
What were our ages when we wed?

[EDIT] Consequently, subtracting 15 from the each of the values of M and N thus obtained, we observe that at the time of the marriage, the respective ages of the man and his wife were respectively 45 and 15.