You need to join twice to the table with the user data - once for each user involved:
select uf.username from_username, ut.username to_username, message
from messages m
join aspnet_Users uf on uf.id = userfrom
join aspnet_Users ut on ut.id = userto
This sql will work in both databases you have tagged the question with (or any other).