a) The ratio of the part of the triangle inside the circle and outside stays the same no matter what. So, I can set up an equality:

Solving for x gives us:


And that's your answer.
Same thing for part b:



And there ya go. If you have any queries, I'd be happy to help.