Let us assume that the age of Janet's sister is = x
Then the age of Janet = x + 5
Now we also know that their combined age is equal to 51 years. Then we can write the equation as
x + (x + 5) = 51
2x + 5 = 51
2x = 51 -5
2x = 46
x = 46/2
= 23
So the age of Janet = x + 5
= 23 + 5
= 28 years
So the age of Janet's sister is 23 and Janet's age is 28