Unsigned body
The body is a concatenation of the fields below, in this exact order. Each field is encoded as bytes, and the result is the plain concatenation of all fields (in Python,b"".join(body)).
This is an initial explanation. The exact byte encoding of each field is defined in This Repository.
Signing
The signature is an Ed25519 signature over the Keccak-256 hash of a domain prefix and the unsigned body.tx_body is what you send to the node through the Send transaction endpoint.
Transaction hash
The RPC returns the hash when you send a transaction. You can also compute it yourself from the signed body:rx prefix to compare it with the hash format returned by the RPC.