The second comp is much better but you will also need a new power supply(~$50-$100) to handle a dedicated graphics card.
Like the others have said building your own would probably be your best choice here but if you must choose between these avoid the first one at all costs.