You can utilize both features of the Flames of Phlegethos feat when casting Dragon's Breath.
Thanks to the wonders of the modern English language, both parts of this feat can be read two different ways, but from context, I think we can suss out the correct reading.
When you roll fire damage for a spell you cast, you can reroll any roll of 1 on the fire damage dice, but you must use the new roll, even if it is another 1.
This can be correctly read as either "At the time you cast a spell, if it deals fire damage, you can reroll one of the damage dice" or as "Whenever a spell that you have cast deals fire damage, you can reroll one of those damage dice". I'm strongly inclined to believe that the second should be the correct reading, for the simple reason that if it was intended to only be useable at the time of casting, they would almost definitely have written it as "when you cast" rather than "when you roll damage".
There are two points of evidence that support this. Firstly, there are a number of fire spells that can deal damage on a turn other than when it was cast, Dragon's Breath of course, as well as Wall of Fire, Delayed Blast Fireball, and Flaming Sphere, to name a few.
The other reason is because the very next portion of the feat uses the exact language that would limit when the feat could be applied, "when you cast". While it's not a guarantee that this means that my interpretation is 100% correct, it does make the alternative highly unlikely.
This means that the first portion of the feat will trigger every time Dragon's Breath is activated, assuming that you are the one rolling the damage. As a technical note to that, I believe the correct person to be rolling damage is the person who Dragon's Breath was cast on, not the person who cast it.
The last portion of the feat is less problematically worded, but still a bit of a problem.
Whenever you cast a spell that deals fire damage, you can cause flames to wreathe you until the end of your next turn. The flames don’t harm you or your possessions, and they shed bright light out to 30 feet and dim light for an additional 30 feet. While the flames are present, any creature within 5 feet of you that hits you with a melee attack takes 1d4 fire damage.
As mentioned above, this very explicitly does specify that it can only be done "when you cast". However, "that deals fire damage" can be read in two ways, either as "is currently dealing fire damage to someone" or as "has the capacity to deal fire damage to someone".
I believe the second reading to be the correct one in this case as well. Lead rules designer Jeremy Crawford has made comments in the past that that's how he would allow similar abilities (namely, the Storm Sorcerers' Heart of the Storm feature, which is nearly identically worded, except for the damage type) to be used in his games.
Further, if it was intended to only be used when casting and dealing damage, it would have been phrased something more like "Whenever you cast a spell and deal fire damage with it" which would explicitly limit the ability to only triggering when dealing damage at the same time the spell is cast.