As bodhi.zazen mentions, the easiest way is to just put a light OS on the less powerful machine. Other options will require a lot more work.
Dual booting as terdon suggests only lets you use one OS at a time, which from my understanding of your question is not what you are looking for.
You can also run some kind of virtualization software on your more powerful computer. Install Ubuntu as a virtual machine. With Ubuntu on the less powerful machine, you can either remote into the virtual machine with something like VNC, or do something like X11 forwarding. This will mostly utilize the CPU and hard drive speed of the more powerful computer. Graphics performance in a situation like this won't be helped much, and it depends on the network.