First, make sure the water temperature is kept around 78F (bettas are tropical fish and prefer warmer waters). If you have lights on the aquarium, turn them off during treatment to reduce stress.
I’m guessing your aquarium has not been cycled. Google “aquarium nitrogen cycle” or “how to cycle a freshwater aquarium” or something similar if you don’t know what I’m talking about. Essentially, right now, if your tank hasn’t been cycled, in addition to fin rot, your betta is being burned by ammonia from his own waste product. You need to do 50% water changes every single day. If after a full week of daily water changes, your betta’s condition is improving, then keep on doing that until the fin rot is completely gone. And then keep on following instructions you have found for fish-in cycling until your aquarium is completely cycled.
If after a full week of water changes, your betta is no better, or is worse, you need to try medication. If you use carbon in your filter, remove that, because activated carbon removes medication from the water.
The mildest medication you can use is Aquarium Salt. This is NOT the same thing as table salt, or marine salt! Make sure you read the label when you purchase it at the pet store. In a separate, clean, dry container, pour in about half of the water from the aquarium. Add aquarium salt at a rate of 1 teaspoon per gallon. So, since your aquarium is 2.5 gallons, you need to mix in 2.5 teaspoons of aquarium salt. Mix until completely dissolved. If it’s not completely dissolved, it will burn your betta. Once completely dissolved, very slowly and carefully pour the water back into the aquarium. Feel free to pour the water back in over the course of an hour or two to let your betta adjust to the salt. Change 100% of the water every day until the fin rot is completely gone. Every time you do a water change, mix a new batch of aquarium salt and water mix. Obviously, use water that has been dechlorinated. Do not use this treatment for more than 10 days. If your betta is completely healed after 10 days, great! Now you need to take steps towards cycling your aquarium so your betta doesn’t die of ammonia poisoning.
If your betta is still not better after the aquarium salt treatment, you will need to use an antibacterial or antifungal medication. Take a 3–5 days after the aquarium salt treatment to do daily 50% water changes to gradually remove the salt from the water. Prior to starting treatment with a new medication, do a 100% water change. Medications that might work include Maracyn-II, Jungle Fungus Clear, Erythromycin, and API Fungus Clear. Only try one medication at a time, and carefully follow the instructions on the label.