Explosives are chemicals that have very fast burn rates at different degree.
First the Dynamite:
-The dynamite is an explosive that made from nitroglycerin, and it is a type of the explosive that has a fast burning rate and makes it very strong explosive. Physical shock can make the dynamite to explode and makes it highly dangerous.
-But the fireworks are a class of low explosive, the stuff that used in it is black powder.Because this explosive has a slow burn rate than dynamite that makes it less dangerous and safer than dynamite explosives
-SO although the dynamite and the fireworks are both explosives they have different burn rates which make them totally different in safeness.