I want to plug the total values as shown by the red arrows on the image below on a formula. How would I do that?

Over line totals are a horrible spiderweb in estimating tools like Sage, Destini and Ediphi. What would be a W in my book is if we could assign UOM at the folder level then it rolls up that UOM, that is how Sage works.
Nobody I know can do formauls in overline totals like you are asking, so find plan B is my 2 cents.
This won't work exactly like you want it to, but you could create a custom variable that is called "Total Wall Area" or something. Hide it by default. Then turn it on for these takeoffs. It should be a function variable. Then have the function be equal to the wall area of each takeoff.
Then you can do a manual sum of the value "Total Wall Area".

The sum formula below has a filter on it. Yours would want to be sum('total wall area', {type:'segment'})

something like this might help, custom properties saved at the folder level.
i use for summing all concrete and reinforcement values
Child items sum to the parent, parent sums to the folder, labor constants [../Folder Property]
Takeoff

Folder

Custom properties

I appreciate all the feedback guys, plan B should work for now. Thanks!
Any input from the ZZ team?
We don't have a way to reference those values yet, but we are planning to add a computed column to reports that can compute based on those aggregated values. Note: this number would only appear in the reports, and if you want to use the value of that grouping in a formula , I recommend using one of the methods suggested by @David or @Thomas.