hi! there's lots of room for someone to tie the histories of these two sports in the USA together, but meanwhile, you can get started on a few previous posts:
How did the dominant sports in the USA come to be so different from the rest of the world? - mostly about gridiron football, but also has several comments on Basketball
Why doesn't the United States have a tradition of playing British sports, such as soccer and Cricket? Why does the United States have so many sports unique to the United States? - this post includes links to several more; check the first bunch that relate to soccer/association football and skip all the cricket stuff :)