I assume that you have enough of the impurity to develop a calibration plot for it (since you have enough to determine the spectrum). The response factor for any compound is the slope of its calibration plot. The relative response factor would be the ratio of the response factor for the impurity to the response factor for your API (both measured at the same wavelength).
All of that said, my 2 cents' worth is that you would get more reproducible results by detecting each compound at its respective optimum wavelength, with a separate calibration plot for each. It's more work, but better science.