It sounds like you're saying you have an 11-42 cassette and a 36/26 2x crankset. You want to know what sort of RD you need (i.e. medium or long cage). Basically, you want to calculate the rear derailleur's capacity.
Fortunately, this is easy! The required capacity is the sum of your largest minus smallest cassette cog and the largest and smallest chainring. You need a capacity of (42-11) + (36-26) = 41 teeth. I suspect this means a long cage RD, but check the specs of the RD you want to buy.
I think that chain guide usually means some sort of guide to prevent the chain falling off a single front chainring. You do not need one for a 2x system (and you might not even need one for a 1x system, although mountain bike readers might want to read the addendum to the answer). You can still install one. In my experience with cyclocross bikes, I never had one that worked well, and at least once I had the chain drop off and get stuck under the chain guide, so I was actually worse off. (Pro tip: if you drop your chainring off the inner ring, shift to your outer ring and keep pedaling; this will often derail the chain onto the small ring. The same can work if you drop the chain off the outer ring, provided it hasn't got wrapped around anything).
If your old chain was correctly sized, then you could just break the old one, then put the new one alongside it, and cut the new one to the same length as the old one. Otherwise, Park Tools has a good explanation of how to size a chain.
As to the third question, Criggie's answer is informative. Park Tools also gives instructions on how to measure your current chainline, but this requires a pair of measuring calipers. Also, you may not need to measure your chainline. If you changed the cranks, you would want to get one with a chainline comparable to the old crankset. Manufacturers will publish the chainline in their specs. If you changed the front derailleur, just make sure it's designed for a chainline comparable to your crankset. If you are changing parts, the chainlines don't have to be exactly equal. I would guess that within 1mm or so is acceptable. The Shimano GRX gravel crankset has a chainline 2.5mm wider than the road cranksets, and some people have successfully used GRX cranks with road FDs, so as a guess, a chainline difference of up to 2.5mm may work but it's not guaranteed.
Bonus: I have not paid attention to chain retention devices for 1x drivetrains over the years. However, a recent article on the Cannondale Slate reminded me that chain guides were a mechanism to aid chain retention for 1x systems. A chain guide can be seen in this 2016 review of the Cannondale Slate, which was arguably a precursor to modern gravel bikes, with an earlier version of the SRAM Force 1x drivetrain.

I don't believe these chain guides ever became popular on drop bar bikes. On 1x CX race bikes in the 2000s, my recollection is that riders would sandwich their chain in between chain guards mounted to the crank. That was considered the gold standard. I recall an alternative standard being an outer chainguard and a chain guide mounted on the seat tube, but I don't recall this being that common; you might as well get the second guard.
By the 2010s, I believe that 1x drivetrains had become common on mountain bikes. When drop bar bikes imported them, I believe the technology was already developed enough that chain guides weren't widely used. The 2016 Slate in the link had a narrow-wide chainring and a clutch rear derailleur, both of which are currently considered sufficient for chain retention without a guide. Indeed, the review article already alluded to this, and I saw one other review of the Slate from that era without a chain guide.
I'm not familiar with mountain bikes, but it seems like chain guides may be popular on downhill bikes. Some cross country or enduro mountain bike riders may opt for the extra protection of a chain guide. Two recent cross country world champions, Nino Schurter and Kate Courtney appear to have chain guides mounted.
However, that discussion related to chain guides for 1x drivetrains. The ones that Courtney and Schurter were using appear incompatible with 2x drivetrains like the OP has, as they're mounted where the FD would be, and they may not be able to account for the fact that the chain can shift. The chain guide I referred to in the main response was a plate mounted by the inner chainring.