I agree with the others. It's fine to go lots further for swimming or biking, but be careful about the run if you are just starting out.

I have recently done my first two sprint triathlons. I'm not a runner at all, so I started from basically nothing and progressed up to 3.5 miles as my longest run prior to the first tri. I was fine. Not fast, but fine.

Actually, I did the same for my swim. My longest continuous swim prior to the first race was 500y (same distance as that first tri) even though my workout totals were well above that.

I'm a cyclist first and foremost, so I didn't train for that portion at all, really.

As a reference, I ended up dead center middle of the pack for my AG in both tri's. Of course, if you want to be faster than that, you'll probably not want to take my advice.