The post is phrased in terms of Will Smith, but for the actual trade made, he/the 5th OA pick is a minor part. It is hard to say whether the trade made justifies the pick exchange. Still, based on you saying that it is time to compete, sending Perfetti and Theodore for Gaudreau and Rielly is probably a good move. Gaudreau will be 30 for the start of the season and past his prime, but will undoubtedly be featured in CLB. Rielly's contract and surrounding teammates guarantee a high floor, even if he never hits 70 pts again. You've bought some solid, dependable floor with this move, if contending is your primary goal.
While Smith certainly looks good and probably merits selection at pick 5, at this point it is hard to say that the difference between him and, say, O. Moore, R. Leonard, G. Perrault, or A. Cristall is larger than the difference between the values of the two veterans you sent for the two veterans you received. Again, it depends largely on your team goals, whether you're rebuilding or arming for a title run. At least it isn't clear enough to me to say that you did the right or wrong thing in order to probably secure Smith.
The other thing is that I wonder if now is the best time to make this kind of deal. Smith's value has never been higher than right now coming off the U18s. We don't know how the draft lottery or draft will work out. If Bedard goes to Columbus, then it looks very good for you, with Gaudreau inevitably rising. If Chicago gets pick 5 and Will Smith goes there, then you're probably looking at delayed performance given the lack of just about anyone else with whom he can play. If Smith is mostly a Joe Thornton/Kuznetsov guy who will be better at setting guys up, he'll need a triggerman to turn his passes into assists. I might want to see who gets pick 5 or who drafts Smith to see if there's a current or emerging player who might fit that bill.