The man who killed a rapper during a home invasion planned a second armed attack months later, with a court hearing he “wanted to become a gangster”.