In this problem, we can formulate two equations.
 First, the overall mass balance of the ointment. The mass of 30% salicylic acid ointment plus the mass of petrolatum must be 50 grams.
 x + p = 50
 Where x is the mass of 30% salicylic acid ointment and p is the mass of petrolatum
 Second, the component mass balance of salicylic acid:
 0.3 * x = 50 * 0.05 
 x = 8.33 g
 Therefore the mass of petrolatum to be used is:
 x + p = 50
 p = 50 – x
 p = 50 – 8.33
 p = 41.67 g
  
 Answer:
 41.7