Answer to "batterey replacement fir my Mini Maglite AA"You can gently pry that black cap off using a small flathead screwdriver. Under that you’ll see a black piece that holds the bulb in place and the electrical connections. Push that backwards out the end of the tube away from the head.
Answer to "Why does my light go bright then dim and Bright then dim?"Most likely there is some corrosion or loose connection. Follow the complete teardown instructions including the added comments. A q-tip with vinegar goes a long way when it comes to Maglites. You just need to take it apart completely including the DO NOT REMOVE tab and clean all the parts thoroughly. Good luck.