They are both convicts not just ordinary prisoners in local county goals. Both prisons were government run (Local county record offices usually only hold records for county prisons). This means the offence was serious enough for the men to be serving a term of hard labour.
They would have first been held in the local county gaol (so check with Staffordshire record office for the survival of Staffordshire gaol registers) before being tried either in the quarter sessions or the assize courts.
Quarter sessions records would be held at the local county record office, assize records are held at The National Archives. Both the TNA and the local county record office probably hold calendars of prisoners which will list them and their crime and any previous convictions.
Once convicted they would have been sent to a government prison like Pentonville or Millbank where they would be kept for some months to 'break their spirits'. Pentonville maintained a 'separate system' where convicts were not allowed to speak.
http://www.historyhome.co.uk/peel/laworder/penton.htmThe National Archives have good records for Pentonville Prison (PCOM2 61-83 for the years 1842-1885) some of which include photographs of prisoners (1875-1885). Millbank registers are in PCOM2 20 to 58 but only go up to 1877.
After some months convicts were transfered on to other government prisoners to serve their term of hard labour. TNA have registers for Parkhurst PCOM2 59 but only for the period 1853-1863 and quarterly returns for Borstal in HO8 201-207, 1874-1876 but that looks about it. Prison records do not have a particularly good survival rate in general.
David Hawkins book 'Criminal Ancestors A guide to Historical Criminal Records in England and Wales' states the prison service holds the following records for Parkhurst prison for the period you are interested in
Surgeons' Reports 1838-1883
Registers of Inmates 1882-1900 (probably registerd as they entered the prison so too late for your man)
Unless their behaviour was poor, both convicts were likely to have been released early on licence. PCOM3 1853-1887? (I think goes up to 1887, I haven't searched the later period). Later licences have convicts' photographs and are very detailed records, but the series is time consuming to search with no indexes for the later period.
Stan's advice is spot on to check the report of the case in the local newspaper. Stafford Record Office from the calendar of prisoners should be able to give you the date of the trial. Only a newspaper report will give you all the background details to the crime. The court records will just give such details as a brief outline of the charge and sentence.
Regards
Valda