That is a great question. I used to be well versed in capology, so I know that there is a way to get them both done. It all depends on if both players are willing to work the money in a way that is cap friendly.
They both want to be paid tops at their position, $20 mil per year for Smith, $45 per year for Lamar or there abouts.
The Ravens have never really been ones to get very tricky woth the cap, one reason that they are always right around even with the cap every year. Frankly, it used to drive me nuts, but then we have two Super Bowl wins in 20 years or so...