let the sleeping years be x and watching tv be y.
from 1st condition
x + y = 35 ...............(1)
from 2nd condition
x - y = 17 ..................(2)
now,
Adding equation 1 and 2
x + y = 35
x - y = 17
____________
2x = 52
x = 26 yrs
substituting the value of x in equation 1
26 + y =35
y =35 - 26 = 9yrs