how can i calculate how much caffeine is in a brew of 3 teabags of green tea and 1 teabag of earl grey in 24 cups of water? I'm trying to reduce the caffeine content.
You won't be able to directly measure the caffeine content without lab equipment. You can use estimates, but the caffeine content of tea varies between different varieties, and varies by the preparation method (time to steep, temperature).
For example, this BBC Good Food guide to your question says:
An average cup of black tea with milk contains around 47mg of caffeine.
Green tea contains less caffeine than black tea, with on average 33mg per cup.
This Twinings page about caffeine in green tea says:
Twinings green tea contains around 30-40mg of caffeine per cup, based on 200ml of water being used.
These are both British references, so will be based on a cup of tea made by steeping one teabag in a mug of near-boiling water for a few minutes. If you search online you will find caffeine ranges for other preparation methods.
If you are interested in reducing your caffeine consumption, the important fact for you is that green tea contains a little less than black (so drinking more green and less Earl Grey will reduce caffeine intake), and of course you can dilute the tea so that you are consuming less of it (but this will also dilute the flavour). The simplest thing to do would be to buy decaffeinated tea.