Samsung Electronics posted a solid third-quarter net profit as its flagship semiconductor business bounced back strongly, supported by an artificial-intelligence boom fueling chip demand.