Assume y is the second number and x is the first: 2y=5x-2; x=y-5, so y=x+5 (add 5 to both sides) and 2y=2x+10 (doubling both sides); substitute for 2y: 2x+10=5x-2; 12=3x (subtract 2x from both sides, then add 2 to each side); x=4 (divide through by 3); y=9 because y=4+5, substituting x=4.