Part (a)
Refer to figure 1 in the attached image below. The a,b,c,d,e are placeholders for numbers we'll fill in later (that turns into the table for figure 2). Hopefully you agree about the placement of the numbers. If there's any confusion, then please let me know.
Along the bottom row, we can see that 39+e = 65 which solves to e = 26 after you subtract 39 from both sides. This tells us that there are 26 non-physics majors (ie their major is anything but physics).
Then along the "non-physics" column, notice how b+6 = e, which is the same as b+6 = 26 after replacing 'e' with 26. Solving that equation leads to b = 20. So we have 20 people who are seniors and non-physics majors.
Now move to the top row. We can see that a+b = 30, which is the same as a+20 = 30 because we plug in b = 20. That solves to a = 10. So we have 10 seniors who are physics majors.
----------------
Now along the first column, we have a+c = 39, aka 10+c = 39, which solves to c = 29. There are 29 non-seniors who are physics majors.
The last variable to find is variable d.
Along the second row, we can say,
c+6 = d
29+6 = d
d = 35
Or we could say that 30+d = 65 along the last column which also solves to d = 35. This tells us we have 35 non-seniors in the class.
----------------
To summarize so far, we have
a = 10, b = 20, c = 29, d = 35, e = 26
These values will replace the letters as shown in figure 2.
Figure 2 will be used to answer both parts (a) and (b).
----------------
After that (more than) slight detour of filling in the table, we can finally tackle the question at hand. We're asked to find the probability of selecting someone who is a senior and a physics major. We have a = 10 people who fit the description out of 65 total
Divide the two values and reduce the fraction as much as possible
10/65 = (2*5)/(13*5) = 2/13
Answer: 2/13
==========================================================
Part (b)
There's a lot going on with part (a). Luckily there aren't many steps here because pretty much all the work has been done already. We'll refer to figure 2 below.
We're told "given the student is a physics major", which means we focus solely on the "physics major" column only. We ignore everyone else because we know 100% that whoever we selected majored in physics.
We have a = 10 seniors who are also physics majors out of 39 physics majors total.
That constructs the fraction 10/39
Answer: 10/39