SELECT users.name, users.surname, message FROM messages WHERE id_host = $id and id_buddy = $user_id JOIN users on messages.id_buddy = users.id and messages.id_host = users.id
дошел до такого, но не очень то оно и хочет работать
SELECT
sender.name
, sender.surname
, messages.message
FROM
messages
JOIN users sender ON messages.id_host = sender.id
JOIN users receiver ON messages.id_buddy = receiver.id
WHERE
messages.id_buddy = $user_id