Probability Random selection from class 

*Suppose that a certain college class contains $62$ students. Of these, $35$ are sophomores, $38$ are biology majors, and $12$ are neither. A student is selected at random from the class.


(a) What is the probability that the student is both a sophomore and a biology major?
(b) Given that the student selected is a biology major, what is the probability that he is also a sophomore?
My answer:
a.$P(S and B)= (35/62)+(38/62)-((62-12)/62))=23/62$
b.$P(S|B)=(23/62)/(38/62)=(23/38)$

I agree with @MattiP that your answers are correct. But I want to mention
a general method for problems like this. (Making a table of the kind I
suggest is also useful for somewhat more advanced topics in statistics.)
It is often useful to make a $2 \times 2$ table for such situations:
You are given this information:
                    SOPH
            -------------------
 BIOL       Yes              No       Total
 ------------------------------------------
 Yes                                    38
 No                          12
 ------------------------------------------  
 Total       35                         62

From there you can find the marginal totals for both Biology and Sophomore.
Then because you have one count (12) in the body of the table, you can get
the rest.
Sometimes people say such a table has only 1 'degree of freedom' because
once you have the marginal information and one count in the body of the
table, the other three counts are determined.
When you are finding the conditional probability $P(S|B)$ you are only interested in the first row
of the table (for BIOL = Yes). Twenty-three of the 38 Biology majors are
Sophomores.
