Question: So the question asks: 

Tom and Jerry set up a meeting at a restaurant. Each one of them, independently of the other, arrives at some random time between 9:00 pm and 10:00 pm (that is, the arrival time is uniformly distributed between 9 and 10). Jerry is quite patient and waits for 10 minutes and then leaves, while Tom waits for 5 minutes and then leaves. What is the probability that they meet? Given that they met, what is the probability that Tom arrived first?

So so far I got: 

[![enter image description here](https://i.stack.imgur.com/ih2TV.png)](https://i.stack.imgur.com/ih2TV.png)

So the area between the blue lines is the possibility that Tom meets Jerry: 

So P(Tom and Jerry meet) = $\frac{60^2 - 0.5 \* 55^2- 0.5 \* 50^2}{60^2} = 0.232638889 $

And for the probability that Tom arrived first given they would meet, I think since the total area of possibility that they meet is 

$60^2 - 0.5 \* 55^2- 0.5 \* 50^2 = 837.5 $

So the probability that Tom arrived first would be : $\frac{0.5 \* 837.5 \* \frac{5}{10+5}}{837.5} = 0.166666666 $

But I really not sure about this answer. So does the first part look alright, and how can I get the probability that Tom arrived first?

Answer: 
Substitute $x=\frac{\pi}{2}-t$.

$$\int{\sec(x)} dx=-\int \frac{1}{\sin t}dt=-\int \frac{1}{2\sin \frac{t}{2} \cos \frac{t}{2}} dt =-\int \frac{\frac{1}{2}\sec^2 \frac{t}{2}}{\tan \frac{t}{2}} dx=-\ln|\tan\frac{t}{2}|+C=-\ln|\tan(\frac{\pi}{4}-\frac{x}{2})|+C$$
HINT:

Let $y=\dfrac\pi4-\dfrac x2\implies x=\dfrac\pi2-2y$

$\sec x=\csc2y=\dfrac{\sec^2y}{2\tan y}$

Set $\tan y=u$