What is a good substitute for egg and wheat flour in baking?
I have a friend who is allergic to eggs and I would like to be able to bake for her.
I have another friend who is gluten free.
Can these allergies have combined substitutes?
AFAIK, (which isn't much) there is no one good substitute for eggs in baking. This is because the egg can be there for one or more of several reasons. This includes as a flavorant, emulsifier, moisturizer and leavener. So, I'll address each of these separately.
Flavor - I have yet to find an ingredient or ester I can easily produce to replicate the very eggy taste of eggs. You're best bet is likely a commercial substitute (which also may solve the other issues below).
Emulsification - (Soy) Lecithin. Period. Probably about a tablespoon per egg yolk replaced. If this leaves your recipe too dry...
Moisturizer - Applesauce. Period. The high pectin is an emulsifier as well, and it will moisturize without imparting strong flavor. Alternatively, add more liquid (which see below for gluten notes).
Leavening - Baking powder may do the job here. You may also want to use buttermilk alongside it. If that doesn't work, Xanthan Gum may be worth trying alongside the BP or buttermilk. Use VERY LITTLE XG, it will thicken it up nicely. However...
Gluten. Its what makes bread so bready. As long as what you're making isn't bread (if you need to sub egg out for a whole egg in bread, I got nothin') you can substitute out any flour that's not wheat, rye, or barley based. If you're friend has Celiac Disease, simply not using those flours or any byproducts in a from-scratch recipe should be fine. If your friend has IBS and it's a FODMAP issue, there's quite a few more landmines to avoid, and I recommend asking a nutritionist for specific advice/check a recipe. If it's an allergy to wheat, ask for a list of known allergens from your friend. Best thing to do is have your friend forward the specific diagnosis that their doctor/nutritionist gave them; I'm sure they wouldn't mind so that you can safely cook for them.
It's not quite as easy as just using a different flour though. You'll probably want to use less flour overall, and a mix of different flours to go toward a specific taste and feel.
TLDR; Substitutions are hard. Use rice flour and applesauce, I guess.
Experiment! You can report back with your findings...
It depends on what you're trying to bake.
For cookies and brownies, I've had good luck using ground flax seed plus water. This won't work for items where you need to whip egg whites separately.
As for the gluten, there are plenty of 'gluten free flour replacements' available commercially, but some are better than others for specific items (breads vs. cookies, etc.). See my answer in What are good references for Gluten free baking? . If you're going to be doing this a lot, it may be more cost effective to mix your own, but for the one-off use, go with the mixes.
Note that if you don't use the whole mix, you want to bag it or put it inside some other container, then store it away from your flour. Also, find out if the person has Celiacs, or is gluten sensitive ... if they have Celiacs, just cooking in a kitchen that had flour in it and wasn't fully sanitized might set them off. (eg, do you have an open container or hanging rack with utensils in it? They might have traces of flour on them. As might things in drawers or cabinets, if you went to grab measuring spoons or a pan when you had flour on you)
Easiest thing to do: Google "Egg Free Gluten Free" and pick something. There's a lot.
When substituting eggs for moisture another good substitute is mashed banana. It works similarly to the applesauce.
Rice flour is my favorite glutren-free flour replacement because it's easy to get and cheap from any Asian market/Asian aisle at any big boxed store. Just be careful of this, I have read some people with celiac have trouble with this rice flour as it has a tinnyyy bit of wheat in it and upsets their stomach. But anyone who has just chosen to be gluten free will most likely not mind that the rice flour may have been processed in the same building as wheat.
Oats are my second go to gluten-free thing for baking, but again like the rice flour most of it is cross contaminated with wheat. But you can get gluten free oats fairly cheap, too. I know Bob's Red Mill has some for sure but it will usually say on the box. You can stick oats in a blender/food processor to make them fine before baking.
Somehow I've attracted a lot of people with allergies in my life! Sometimes it's easier to just cook different things for everyone.
For recipes where you don't want to use apples or bananas, I suggest plain yogurt. After baking it is essentially tasteless in cookies or brownies. It will add a slight taste to bread, making it taste a bit like sourdough. Best of all, yogurt serves most of the purposes that eggs do: it adds moisture, acts as a binder, and makes the dough/batter less acidic.
In any recipe, use about 1/3 regular (not fat-free) plain yogurt for each egg.
Most yogurt is gluten-free, but some (especially Greek yogurt) is not. Check the labels or search the name of the brand online.