The correct answer is: B. Katoch dynasty.
Hamirpur is a town in Himachal Pradesh, India. It is the headquarters of Hamirpur district. The town was founded in the 11th century by Raja Hamir Chand of the Katoch dynasty. The Katoch dynasty is a Rajput dynasty that ruled over the Kangra valley in Himachal Pradesh for over 1,000 years. The dynasty was founded by Raja Bhima Chand in the 8th century. The Katoch dynasty reached its peak during the reign of Raja Hamir Chand in the 11th century. Hamir Chand was a great warrior and he defeated the Mughal emperor Akbar in the Battle of Gaghar near Hamirpur. Hamir Chand is also credited with building the Hamirpur Fort. The Katoch dynasty ruled over the Kangra valley until the 19th century when they were overthrown by the British.
The other options are incorrect. The Trigarta dynasty was a dynasty that ruled over the Trigarta region in Punjab, India. The Pala dynasty was a dynasty that ruled over Bengal in India.