I have 2002 elantra with similar problem. (but only takes 3 minutes to activate the problem) gets locked in 3rd gear, so have to start from a stop in 3rd, and revs really high when attempting freeway speed. also resets itself when you turn the ignition off, but will come back immediately (4 seconds, i think) as soon as you hit 30km/h the first time. (if you're seeing something slightly different read on anyway, some useful resources here)
So I'll start by saying I haven't fixed my problem yet, but found a lot of detail on it, which I'll share. First, check out http://www.hmaservice.com/
this is hyundai's site for service bulletins and other useful info. Locking into 3rd gear is one of 11 failsafe modes for the transmission, which they refer to as "electrical limp home mode" read the descriptions of the failsafe modes if yours is slightly different.
Second, get someone with an electronic read-out to check your DTCs (Diagnostic Trouble codes) I got mine done at AutoZone, who offers the service for free. Make sure you leave the car running, so the DTC doesn't clear itself, as it does each time you turn off the ignition. You'll probably get one of the four codes P0715, P0720, P0721 or P0722. 715 and 721 indicate a problem with the input speed sensor, which measures the rotation rate of the shaft going into the transmission, and the other two are codes for the output sensor, which reports the rate of rotation of the output shaft. In both cases, the problem can be that the sensor is blown or that the wiring leading up to it has a problem.
Now go back to hmaservice.com and look up TSB (technical service bulletin) 09-AT-016
it has a good picture of where to find the sensors on top of your transmission. there are some others that detail the failsafe modes (search on failsafe). you should have something to go on from here.
Unless your brother moved the sensor over from your old transmission to the new one, the fact that you still have the problem would suggest that the problem is in the wiring harness. Now, if it's a wiring problem, what would cause it to work OK for some time when the vehicle is cold? check to see if you have a puddle of coolant on the sensor when you start, and then look again after the problem kicks in. they put the sensors on top, where liquid can puddle, and beneath the coolant hoses where they often leak, especially after 8-9 years of use.
there is one catch, and that is if I read the info correctly, the 2000 elantra is a whole different series than the 2001-2009, and may be entirely different in codes, failsafes and sensor locations, but the three steps are still the best course for you.