That itinerary is perfectly valid under the Visa Waiver Program (ESTA) rules.
On your first entry on January 28th you will be given 90 days to remain in the US, which will give you until (around) the end of April. Time spent in Canada IS included in this time, so when you enter Alaska they will treat it as if you didn't leave the US, so you will still be allowed stay until April.
When you re-enter the US on May 12th it will be treated as a separate trip to the US. At this point it's likely you will be given given another 90 days to remain in the US, although it's possible you will be given less - however you should not have any issues being given at least enough time in the country for your June 20th departure.
One of the conditions of entry into the US under the Visa Waiver Program is that you have a return/onward ticket to somewhere outside of North America. This means that at the time of your entry in Hawaii, you will need to already have the ticket to South America booked. Simply having your return ticket from the US on June 20 will NOT be sufficient as this is outside of the 90 days you are allowed stay in the US on that entry - you will need a ticket to somewhere outside of North America, within 90 days of entry.
Similarly, when you re-enter the US on May 12th, you will need to have a ticket to take you outside of North America on June 20.
(For the purposes of this rule, "North American" means Mexico, Canada, Bermuda or the Caribbean Islands)