Clearly there was a large cost both in money and resources. Working on both very likely slowed down the production of the first nuclear bomb.
To simply say that they wanted to try out different types is to miss the point that weapons-grade uranium and plutonium have fundamentally different production methods and lend themselves to very different weapon designs.
Uranium bombs require a very high percentage of the isotope U-235, which is only present in miniscule quantities in natural uranium. Separating these isotopes is a difficult and time-consuming task, especially with the vastly less efficient methods being used during the Manhattan Project. The chemical properties of the two isotopes are nearly identical, with the only difference being that U-235 is ~2% less dense, thus necessitating the highly complex and expensive process of gaseous diffusion, centrifuges being used in later periods. Plutonium, on the other hand, can be produced with relative ease in a reactor, and is thus available in greater quantity.
On to weapons design. Little Boy, the first uranium bomb, was a gun-type weapon, meaning it simply used an explosive to fire two sub-critical masses of uranium together, forming a critical mass that would then detonate. This was a (relatively) simple, robust design that was the first theorized way to create a nuclear weapon. Fat Man, the plutonium bomb, used an implosion design, which involved using very high explosives around a spherical plutonium core, which, when detonated simultaneously, would compress it into a critical mass. This required exacting tolerances in the timing and force of the explosions, or else the uneven shape of the precritical mass could react in such a way that the plutonium core was blown apart before it could reach criticality (incidentally, this is basically why a gun-type plutonium weapon wouldn't work).
So we have two weapon designs- one has been in development for a longer time, is simpler and theoretically more reliable, but requires a difficult-to-obtain substance. The other is newer and of uncertain effectiveness, but if functional, could be produced in much greater quantity. It should be noted that the Trinity test was a plutonium implosion bomb, and no gun-type weapon was ever tested before the atomic bombings, for the twin reasons that it was deemed unnecessary and that they simply didn't have enough uranium. It came down to a choice between having a tiny number of reliable bombs or many more that were of uncertain quality (at least before the first test), and building both meant that all outcomes were covered.
Wikipedia answers this rather well. Basically, a plutonium bomb is more complicated than a uranium bomb. However, weapon-grade plutonium is also easier to obtain than weapon-grade uranium, since the plutonium can be separated chemically from burnt nuclear reactor fuel, whereas uranium needs to be enriched in a costly process. In fact, all of the enriched uranium that was produced during the Manhattan project was used in Little Boy, the Hiroshima bomb.
The uranium-based gun design was the fundamental approach of the project from the beginning.
The "fat man" design used plutonium-239, a substance much easier to produce than uranium-235, but requiring a much more complicated implosion type warhead. It was not clear until 1944 that the implosion design would even work. John von Neumann essentially invented an entirely new branch of physics, called shock wave theory, that was used to design the implosion lenses for the device. Once it became clear that the implosion technique was feasible and necessary for plutonium, the fat man design was added as an improved approach for a second (and all future) bombs.
Thus, the development of the weapon proceeded on two tracks.
The benefits were to have a relatively high-probability-of-success weapon (uranium bomb) and a more advanced bomb (plutonium) for future development.