a) This is a question about "third degree price discrimination," where a firm is able to charge different types of consumers different prices. The general approach to solving these sorts of problems is to treat the two types of consumers as two separate markets and to solve the resulting two monopoly problems. We find the profit maximizing quantities by equating MR=MC. Then, to find the profit maximizing price, we plug our quantity into the relevant demand equation:
For the professionals:
MR=100-2Qp (the trick to finding marginal revenue with a linear demand curve is to just double the slope)
MC = 20
Doing some algebra MR=MC tells us that Qp=40.
Plugging this answer into the demand function tells us that Pp=100-(40)=60
For the students:
MR=50-2Qs
MC=10
Equating MR and MC tells us that Qs=20.
And plugging the answer into the demand function yields Ps=50-(20)=30.
b) This question is telling you that the firm is using a "two-part tariff," where there is both a flat membership fee to access the market and a per unit price to buy each quantity of the good. Turns out, the profit maximizing way to solve these problems is to set the price as low as reasonable (equal to the marginal cost) and then to set the membership fee equal to the consumer surplus generated for each consumer.
By doing this, the firm encourages consumers to buy a lot of the good, which generates tons of consumer surplus that can be "stolen" by the firm through charging a high membership fee. The result is lots of profit for the firm since the firm can capture the total surplus in the market without any deadweight loss. As a result, this will in general lead to greater profits than the monopoly pricing in part a). You could validate this if you wanted by comparing the total profits in part a) to those in part b) but I'll leave that as an exercise!
For the professionals:
Pp=20 since that's the marginal cost
Plugging this into the demand curve tells us Qp
20=100-Qp => Qp=80
To find the membership fee we need to calculate the consumer surplus from charging a price of 20 and selling 80 units of the good. I'd normally recommend drawing a picture to do this since the consumer surplus is the area between the demand curve and the market price, which is the area of the following triangle:
CS=0.5*(80)*(100-20)=3200=membership fee
For the students:
Ps=MC=10
10=50-Qs => Qs=40
CS=0.5*(40)*(50-10)=800=membership fee