5 hours in the studio is the same as 5 * 60 = <<5*60=300>>300 minutes.

To record all of his songs, Elvis takes 12 * 10 = <<12*10=120>>120 minutes.

After editing and recording 300 – 120 – 30 = <<300-120-30=150>>150 minutes are left to write all of his songs.

Songwriting therefore took 150 / 10 = <<150/10=15>>15 minutes per song.

# Answer

15
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
Elvis is releasing a new album with 10 songs, but he doesn't want to waste too much time on writing. He spends 5 hours in the studio, where he writes, records, and edits his songs. Each song takes 12 minutes to record, then it takes 30 minutes to edit all of his songs.   How many minutes did it take Elvis to write each song, if each song took the same amount of time to write?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
15
Elvis is releasing a new album with 10 songs, but he doesn't want to waste too much time on writing. He spends 5 hours in the studio, where he writes, records, and edits his songs. Each song takes 12 minutes to record, then it takes 30 minutes to edit all of his songs.   How many minutes did it take Elvis to write each song, if each song took the same amount of time to write?
train