If you sell a PPE asset and in return get cash and another PPE asset, how is that reflected on the Income Statement and Statement of Cash Flows?

for example
My PPE asset book value that I'm disposing = $1
In return I get another asset worth $32 and also $100 cash.

On the income statement, is my
"Gain on sale of disposed assets" = $99 (cash - book value) or $131

On the statement of cash flows
Is the operating activities decreased by or 1

Is investing activities increased by $99 or $131

or neither

big thanks