I gave the walkie talkie I had stolen back to the owner.
Why did you steal the walkie talkie in the first place?
Because I saw it in the drawer.
It sounds like you did the right thing. You should have never stolen the walkie talkie, but it is good that you returned it. Next time, make better judgments and don't steal things.
I only returned it because my teacher wouldn't give me an A for the project due to the missing walkie talkie.
You should have returned it immediately simply because it's the right thing to do. Stealing is wrong and if you do steal something you should give it back.