sina=√5/5,cosa=2√5/5,tanb=3,sinb=3/√10,cosb=1/√10
cos(a-b) = cosacosb + sinasinb
= (2√5/5)(1/√10) + (√5/5)(3/√10)
= 3/(5√2)+√2/5
= 3/(5√2)+2/(5√2)
= 1/√2
= √2/2
sin(a-b)
= sinacosb - cosasinb
= (√5/5)(1/√10) - (2√5/5)(3/10)
= 1/(5√2) - 3/(5√5)
= (5√2-6√5)/50