What you trying to say is similar to this
X earn $10,000 , bank loan of $5,000, thus debt to earning = 50%
Y earn $100,000 , bank loan of $50,000, thus debt to earning = 50%
because the debt to earning ratio is both 50%, so X = Y .
THIS IS INCORRECT. Even the debt ratio is same as 50%, you CANNOT make a direct equation.
You cannot make it right by playing with this kind of ratio, e.g.
Year 1 , GDP 1000 , deficit 500, debt to GDP ratio = 50%
Year 2 , GDP 2000 , deficit 1200, debt to GDP ratio = 60%
Both base value are different, so you cannot put them inside any equation.
Nevertheless, this is a common problem of people who practice economy attempt to apply mathematics rules.