The dollar finished higher against its main rivals Wednesday for the second session in a row after the People’s Bank of China injected 140 billion yuan into the country’s financial system — a move that helped boost U.S. stocks, which had endured sharp declines in recent days.