We are given

we know that

so, we get
opposite =7
adjacent=24
now, we can find hypotenuse


now, we can draw triangle and then switch vertices accordingly
we can find cos(B) using second triangle

In second triangle:
adjacent=7
hypotenuse =25
so, we get
................Answer