About as long as it did. Both Lee and Grant were outstanding military minds. Both did what they needed to do with the objectives they were assigned, and the men and materials they had available. Grant had the decided DISadvantage of having to fight an offensive war against entrenched forces, which usually resulted in a loss ratio of at least 2-1. One of the reasons Grant attacked the way he did was because he knew he could. There were men there to do it. Lee remained in trenches and fought because that's what his men did best. Neither of Lee's major offensive excursions into the north were ringing successes. He ran into the same problem Grant did, namely "how do you drive men out of trenches when they are defending their homes?".
I'd have to rate Lee as one of, if not THE best defensive general we've ever had. Grant would rank with Patton in my mind as one of the best offensive (read: attacking) generals in our history. To sell either Grant or Lee short based on what the other did is to rely on far too much presupposition. Had either had the other's position and resourses, no doubt their tactics would have changed, and they probably would've ended up mirroring one another.
Anyway, that war's over (sorry, "Southrons"). It's a shame Lee and Grant had to face one another instead of work together.
If Lee only "remained in trenches", the Siege of Richmond would have started in July of 1862 and George B. McClellan would have won the war in the Eastern Theater by the end of that year.
The Seven Days Battle and Chancellorsville were masterpieces of Lee leaving strongly entrenched positions in order to use mobility to rout a larger invading force.
The "Hey-diddle-diddle, straight-up-the-middle" offense substitutes men's lives for generalship.