Calculating the concentration of product in a solution based on the peak area of HPLC
Your advisor is making a pretty dangerous assumption (although sometimes pharma people do it). The assumption is that the impurity is structurally similar to the main compound and its UV-Vis spectrum is almost similar i.e., their extinction coefficients are the same.
The idea in your formula is that the calibration curve for A will be same as B. Well that might be a first order approximation when the impurity is known to be structurally similar.
If B is a known compound, you should buy a separate standard, and make a calibration curve.