use JOIN in your query
cmd = new SqlCommand(string.Format("SELECT Picture FROM ImageTB itb join DetailsTB dtb on dtb.Passenger_Name = itb.Passenger_Name WHERE dtb.Passenger_Name = '{0}'", datagridview_details.Rows[e.RowIndex].Cells[6].Value.ToString()), connection);
also you need check that atagridview_details.Rows[e.RowIndex].Cells[6].Value is not null
(or you will get NullReferenceException)
and also be aware of Sql injection