The sentences where commas are used correctly are:
- The attorney, offering good advice, is my neighbor.
- My neighbor, a practicing attorney, gave me some good advice.
The other sentences contain errors in their comma usage:
- If you want good advice, my neighbor, is an attorney. – The comma before "is" is incorrect.
- The attorney, gave me good advice. – The comma after "attorney" is unnecessary.
So, the first two sentences are the ones with correct comma usage.