There's no right answer. It depends on what you want to do.
My rule of thumb is: If you only use the value once somewhere else, then rather just calculate it where it's needed. If you use it 2 or more times somewhere else, then it's more efficient to save it into a variable and reference it in the other places. In such case it's between speed efficiency and memory use. If you only use the variable once, then there's no speed efficiency gain, but you're using extra RAM for no reason.
E.g. in your 1st codes: S42 is only used once to calculate A. But to get to S42 you used SS twice. So I'd omit S42, S44 & S22. Take this as a sample though, there are many others with similar efficiency gains / minimizing unneeded RAM use.
The only possible reason I'd consider to make a variable where it's only going to be used once - is if I'd like to use it to make the code more readable. Though that's very seldom the case.