What 2 events that involved the US and Japan lead to the end of World War 2?

The Battle of Midway and the dropping of the atomic bombs on Hiroshima and Nagasaki led to the end of World War II.