The Japanese firm posted a $7.7 billion quarterly profit and is ready to chase fresh profits with new AI bets and IPOs.