Short answer: x + y = 10 with x − y = 2 gives x = 6 and y = 4. The determinant is 1 × (−1) − 1 × 1 = −2, and dividing the two Cramer determinants by it gives the pair.
Why the determinant matters
The determinant is the pair of lines’ slopes compared: zero means they rise at the same rate, so they never meet or they coincide. Printing D first is what tells you whether a solution exists at all, before any division happens.
Worked example
Four pens and two notebooks cost ₹48; two pens and three notebooks cost ₹34. With x for a pen: 4x + 2y = 48 and 2x + 3y = 34 give x = ₹11 and y = ₹2, and substituting both back gives 44 + 4 = 48 and 22 + 6 = 34.