Let x = number of minutes that it takes person B to mow the lawn by himself
Then, x-7 = number of minutes for person A to mow the lawn by himself
1/x = portion of lawn mowed by B per minute
1/(x-7) = portion of lawn mowed by A per minute
1/12 = portion of lawn mowed by both A and B per minute
1/x + 1/(x-7) = 1/12
12(x-7) + 12x = x(x-7)
x2 - 31x + 84 = 0
(x-28)(x-3) = 0
x = 28 or x = 3
x can't be 3. Otherwise, x-7 would be negative.
Therefore, x = 28 minutes.