You can set up two systems and solve.
Let j = Jonathans age and d = davids age.
7 years from now: 7(j+7)=6(d+7)
Solve for j and d.
Another approach . . .
We are told that: . . for some integerThe ratio of Jonathan's age to David's is 6:5
Iin seven years it will be 7:6.
Whar are their ages now?
In seven years, they are both seven years older
. . and the ratio is 7-to-6: .
Solve for . . . and then their ages.