Don't try to measure it. Mark it. And mind the kerf.
This is the trick to most woodworking, actually. You don't measure nearly as often as you just hold one piece up to another and mark the location to be cut. You measure for the rough dimensions, of course. But when cutting it to the precise size and shape you need, you mark it.
Assuming you already have the frame of the door and just want to add the X, start with the long board first. Lay the door frame on a flat surface, and place the long leg of the X where you want it to go. The board should be long enough that it protrudes from both sides a little bit. Using something that will make a fine line (like a sharp pencil or a mechanical pencil), mark the outside of the line to cut, such that when you line up the saw blade, the blade will touch the line but won't go over it. The goal here is to account for the kerf of the blade. When cutting with any kind of saw, you must keep in mind that the blade will turn the channel it is cutting into sawdust. Most table saws and miter saws have blades that are about 1/8". But don't try to measure it; just line the kerf up on the waste side of the cut. You want to mark the board so the mark is inside the kerf that will be cut away (so you don't have to deal with marks on your work piece later), and position the cut in such a way that the kerf isn't cutting away the part of the board you intend to keep.
Note that for the cuts on the first side, it won't matter if you miss your mark by a bit as long as you get the angles right. If the angles are right, it should still fit. So if you forget to account for the kerf on the first side, it won't matter as much, because you can just shift the board up a little bit (assuming you have enough length on the other end!). But it is very important for the second side of the board.
Once you've cut the first side, lay the board back on the door frame. The angle on that side should fit into the corner pretty closely, but you still have the other side of the board sticking past its corner.
Now it's time to mark the other side. Before you do, make sure the board is sitting level so you aren't marking at an angle. If the X will be flush with the frame, you're in luck, because you can take one of the offcuts you just produced and place it under the board to raise it so it sits flush against the corner. Make sure the side you've already cut lines up precisely where it will end up. Now, mark the cut on this side. For the second side, I'd recommend making the first cut of the angle, taking it back to the frame, and marking the second cut. That way if one cut of the angle is off, the other one doesn't necessarily have to be off, too.
Repeat this process for the short legs of the X. Show the board to the frame (which means, take it to the frame and place it where it goes), mark the first cut, cut on the saw. Show the board to the frame again, mark the second cut, cut it on the saw. Leave the board long so if you're off more than you like, you can cut it off and start over. When you are satisfied with the angle, make your final cut be the one that matches up to the long leg of the X. Then repeat this for the other short leg.
Something to note: In finer woodworking, many people mark their boards with marking knives, which leave a much tighter line (and which have other advantages, like giving you a notch to line up a chisel to widen the line on the correct side of the kerf, that will also be used to start a hand saw without the saw wandering to the wrong place as it gets started). But for a beginner, this is almost certainly overkill. As you get more practiced at woodworking, your eye gets better, and your desire for tighter tolerances increases. I felt I should mention it so you'd know that alternate techniques exist should you wish to learn them. And also so nobody comes at me for recommending a pencil line! But for beginners, this is what I would recommend. You can erase or sand a pencil line (usually -- not always, though, which is why I'm recommending you place the pencil marks on the side that will be cut away). But it's harder to clean up a knife mark done wrong.