If they're both on the network (i.e. can 'see' (ping) the same router), you should be able to ping eachother.
Is sharing files what you want to do? Probably easier to do that with NFS if there's no Windows systems involved. Setup file sharing on Mac OS X in preferences (has it's own whole little dialog) and setup NFS on Ubuntu, then setup your shares and mount them from the other computers.
If you want Windows computers to be able to join in the fun, NFS won't work. It's too standard for Windows. For that, you would need to use Samba on Ubuntu and Mac OS X.
There's plenty of documentation about NFS and Samba on the web. We're still here if you need help, though.
EDIT: That screenshot was removed... Can you upload it again?