I'm going to assume you tried to fit 2 1/2" pipe into 3.0" sch 40 pipe. 3" sch 80 = 3.068 inside diameter and 2 1/2" pipe has a 2.875 outside diameter.
Below is a link to a standard pipe size chart. I use one just like it at work to select tubing sizes based on wall thickness requirements.
Any of the pipe sizes that seem like they will fit together are likely to be a tight fit and may not fit together at all because of rust, damage, or tolerances. The sizes listed on the chart are considered nominal and manufacturers are permitted to deviate from those sizes within a specified range. If one piece is at max tolerance and the other is at minimum it may not work.
The best way to guarantee a fit it to go to the source and measure the actual pipe you want to buy. You will want a bare minimum of .02(twenty thou) diameter difference for maximum frustration. Don't forget to clean the pipes with emery cloth before you attempt a fit and measure the diameter of the pipe in several places to check for out of round. You should also look for seamless pipe(DOM)or at least welded pipe(CREW)that has the smallest "bump" at the weld location.
One more thing to consider is grade. Pipe is available in a variety of grades and most of the time nobody thinks of it. Most common would be 1018/1020/1026 low carbon grades but you can also get high carbon grades like 4140/45 in both normal and heat treated states. I mention this only because to the best of my knowledge the high carbon grades should not be welded without pre and post treatment of the weld area to prevent stress cracking.
http://www.westlund.ca/docs/pipe_chart.pdf
Anyhow, happy hunting
Mike