To determine the temperature of a star, the best options from your list are:
A) Line spectra – Spectral lines indicate the presence of specific elements in a star and the intensity of these lines can be related to the temperature of the star.
B) Blackbody spectrum – The blackbody spectrum describes the distribution of radiation emitted by an idealized perfect blackbody at a certain temperature and can be used to determine the temperature of a star through Wien's displacement law or the Stefan-Boltzmann law.
Options C and D are not directly used to determine a star's temperature:
C) The star's magnetic field does not provide direct temperature measurements.
D) Light from sunspots primarily affects the surface and luminosity of the star but is not directly used to measure its overall temperature.
So, the correct answers are A and B.