Try this. but the results can really differ if you have only one missing record in either of the tables.
Query
SELECT A.MachineID
,A.TripTime
,B.StartTime
,DATEDIFF(HOUR, A.TripTime,B.StartTime) AS DownTime
FROM
(
SELECT *
,ROW_NUMBER() OVER (PARTITION BY MachineID ORDER BY TripTime ASC) AS RN
FROM dbo.MachineTrip
) A
INNER JOIN
(
SELECT *
,ROW_NUMBER() OVER (PARTITION BY MachineID ORDER BY StartTime ASC) AS RN
FROM dbo.MachineStart
)B
ON A.MachineID = B.MachineID AND A.RN = B.RN
Result Set
╔═══════════╦═════════════════════════╦═════════════════════════╦══════════╗
║ MachineID ║ TripTime ║ StartTime ║ DownTime ║
╠═══════════╬═════════════════════════╬═════════════════════════╬══════════╣
║ XA-065 ║ 2014-03-20 09:40:00.097 ║ 2014-03-20 12:40:00.097 ║ 3 ║
║ XA-065 ║ 2014-03-24 18:33:00.040 ║ 2014-03-24 20:33:00.040 ║ 2 ║
║ XA-070 ║ 2014-03-21 15:17:00.023 ║ 2014-03-21 18:17:00.023 ║ 3 ║
║ XA-765 ║ 2014-03-23 22:16:00.003 ║ 2014-03-23 23:16:00.003 ║ 1 ║
╚═══════════╩═════════════════════════╩═════════════════════════╩══════════╝
Working SQL FIDDLE
Suggestion
Your schema needs some serious attention. You should really have a foreign key constraint between these two tables which binds a record in one table to a record in other table.
OR
You can have all the records in one table with a column which binds two related rows together and a column (Maybe a bit column) which indicates whether a record is starttime or triptime.
Your schema as it is very much error prone.