Problem solve for triangle problem