I’ll try to answer your question on why u subtract only capex instead of all CFI. Capex is an ESSENTIAL CFI activity for a firm as opposed to let’s say an acquisition( A company will continue to stay in business without an acquisition. Without capex, a company cannot continue to stay in business) Every company will have capex every year.
A company needs to incur capital expenditures to conduct its business operations. If not additional capex incurred for future growth, at least maintenance capex used to maintain current operations. Only the cash flow left after taking care of working capital and capex will be available for the company to conduct other activities (dividends, share repurchase etc.)
I hope this helps!!!