There are a couple of things at play here. First lets assume you actually own 2 domains names.
For the sake of the exercise we will assume you own example.com (substitute your 1st real domain name here) and example.net (substitute your real 2nd domain name here)
You will need a DNS record for example.com and www.example.com
You will need a DNS record for example.net and www.example.net
Setup your webserver for one wordpress site at example.com with an Alias of www.example.com
Setup your webserver for the other wordpress site at example.net with an Alias of www.example.net
You will need 24 to 48 hours for the DNS to work its way around the world.
If you don't actually own 2 domain names (remember you can't just make something up, and you can't use example. anything) then you will need to use subdomains of the domain name you actually own.
For instance, www.example.com
and test.example.com where example.com is replaced by the domain name you own.
This should get you started,