Something to keep in mind for a question like so it that all interior angles in a triangle equal 180 degrees, one more thing to note is that a straight is supplementary meaning it adds up to 180 so now let’s begin math!
So 180 - 147 = 33
So Now we can find To do this we need to remember that interior angles of the triangle always equals 180
With that we will add 40 + 33 = 73
Now to find the missing angle we will subtract our sum to 180 to get the answer
180 - 73 = 107
So there it is!
I hope I help!