Maybe they overhear a secret conversation between teachers or magical creatures that give them clues. Or it could be that they discover a hidden room filled with evidence about the Marauders.
The main characters are obviously Fred and George from the Weasley family, and the Marauders which include James Potter, Sirius Black, Remus Lupin, and Peter Pettigrew.
In this fanfiction, Fred and George might get into all sorts of mischief with the Marauders. They could learn some new pranking tricks from James and Sirius. Maybe they'd team up to play a huge prank on Snape, just like the Marauders used to do.
They are likely to be horrified. James, for example, would probably be extremely angry that his friend had to endure such a thing. He might immediately vow to protect Sirius from any further harm. Remus, being more empathetic, would be there to comfort Sirius and offer his support in a more quiet and understanding way. Peter, though not as strong - willed as the others, would still be shocked and follow the lead of James and Remus in trying to make Sirius feel better.
One way is by protecting Harry from the bullies. In the fanfiction world, there could be students who are jealous of Harry being in the Triwizard Tournament or just want to cause him trouble. Fred and George, being older and more experienced, can step in and stop any potential harm.
One possible way is through their body language. For instance, Fred might stand with his left foot forward more often, while George has a habit of leaning to the right when he's standing still. Harry, being observant, picks up on these little quirks.
There are indeed some fred and george and harry gay romance fanfiction pieces. Some authors are really creative in imagining how such relationships could develop within the wizarding world. But keep in mind that fanfiction is a very diverse field, and not all of it may be to your taste. You may need to sift through a few to find the ones that really resonate with you.
You can start by looking on fanfiction websites like Fanfiction.net or Archive of Our Own (AO3). Just search for 'baby Fred and George' in the search bar and you'll get a list of relevant fanfictions.
They might use it to buy more ingredients for their products. They could purchase things like Pygmy Puffs, or other magical creatures and items that they use in their joke products.
One reason could be that they played a particularly mischievous prank on her that went too far. For example, if they made her late for an important exam or meeting with a professor by using one of their wild magical inventions. Hermione, being a stickler for rules and academic achievement, might lose her temper and hex them in retaliation.
They might use their humor. For example, if someone is making Hermione feel bad by teasing her about her studious nature, Fred and George will crack jokes at the teaser's expense, making Hermione laugh and feel better, which is a form of protection in a way.