Which PC is better for gaming?

Computer Type: Desktop
Model: Lenovo H series Desktop H505s (57312710)
Item # : 31613
Processor: AMD Dual Core E2-1800@1.7GHz
Memory (RAM) :4GB DDR3 1333
Hard Drive 1: 1TB SATA II 7200RPM
Hard Drive 2: None
Video Card: AMD Radeon HD 7340
Optical Drive: DVD Combo
Color: Black
Network Card: Integrated Network Card
Sound Card: Integrated Sound Card
Operating System: Genuine Windows 8
Restore CD: None
Keyboard and Mouse: Keyboard and Mouse Included
Item Condition: New In Retail Box
Condition Grade: A
LCD Monitor (For All in ones) : None
Defects: None
Warranty: Upto 1 year Manufacturer Warranty
OR
HP Pro 3500 Desktop
Computer Type: Desktop
Model: HP Business Desktop Pro 3500
Item # : 32306
Processor: Intel Pentium Dual Core G645@2.90GHz
Memory (RAM) : 2048MB
Hard Drive 1: 500GB 7200RPM
Hard Drive 2: None
Video Card: Intel HD Graphics
Optical Drive: DVDROM (Reads CDs and DVDs)
Color: Black
Network Card: Integrated Network Card
Sound Card: Integrated Sound Card
Operating System: Windows 8 Pro - 64bit
Restore CD: None
Optional Components: None
Keyboard and Mouse: Keyboard and Mouse Included
Item Condition: New
Condition Grade: A
LCD Monitor (For All in ones) : None
Defects: None
Warranty: Up to 1 Year Manufacturer Warranty*Based on date shipped to us

And Does anyone know if either of these will handle BattleField 4 with at least 40 frames
Sorry I'm new to computers

Both of those are a joke for a desktop. I recommend making your own.
AMD Athlon X4 750k
MSI-A75-E35( Something like that)
Radeon HD 7770
Corsair CX 430
NZXT Source 210
8 GB Corsair Vengence Ram

The first one is a better computer for playing games. Intel graphics are not worth piss.

Neither of those are gaming computers, neither will play BF4 at all, or any modern games.

For that, you will need a discrete graphics card, and I doubt either of those have the space for one powerful enough to play games well.

Neither will even allow you to run BF4 at all.

You would have to look at the benchmark performance of both processors, but I suspect that the second one is the better CPU.
The graphics of the first are definitely better than the second.

Neither is up to the minimum required hardware for battlefield 4.

Before asking such things in the future you should first search for the game or software you are going to run and "minimum requirements" to find out the minimum needed to run the program at the lowest settings and perhaps "recommend hardware" to see what the mfg recommends for decent performance. If the benchmarks of the hardware do not exceed the benchmarks of the recommended hardware, you shouldn't consider it in any way.