2018 Last year I joined a job, who paid me a joining bonus = $10000.
But this year,2019, I had to change jobs again. Under contract with previous company, I had to return $7500.
How do I claim $7500 deduction on my tax return?
The repayment will be handled on your 2019 tax return. See Repayments in IRS Pub 17:
The full $10,000 must be reported on your 2018 tax return as included on your W-2.
I referred you to IRS Pub 17 for the explanation as to how to claim the refund with your 2019 tax return. There's an entire section on repayments in Chapter 12 of Pub 17 that does not need to be duplicated here. (Pub 17 for 2019 has not yet been released, so in 2018 Pub 17 read each instance of "2018" as "2019.") Since the claim will be made on your 2019 tax return, the claim has no bearing on how you prepare your 2018 tax return. The entire $10,000 is includible as income on your 2018 tax return.
If you use Method 2 in Repayments in IRS Pub 17 to take a Claim of Right tax credit on your 2019 tax return you will likely need to make the entry on line D of the Other Credits and Payments Smart Worksheet of the 1040 Worksheet in forms mode of 2019 TurboTax.