Tesla reported a rise in profit for the second quarter after the company led by Elon Musk cut prices in response to increased competition and higher borrowing costs for car buyers. The company said on Wednesday that it earned $2.7 billion from April through June, compared with $2.5 billion in the first quarter of this year and $2.3 billion in the second quarter of 2022. Sales rose 7 percent, to $25 billion, from last quarter. Lower average sales prices, as well as the cost to produce a new pickup truck,…