I have a deck like below and I want to expand the direction where the arrow shows (sorry for an ugly photo).
Do I need to put a ledger board right on the trim joist, or can I just hang the new joists right on the same trim joist?
The purpose of a ledger board is to give you surface onto which you can nail/attach the rest of the deck (and flashing to keep water out of a house- usually). Your question is, do you need it for attaching two decks.
I think the answer to this is a decision for personal convenience, tools, or need. I personally don't undersand the use of a ledger board here (as far as straight forward construction goes). Suppose you add a ledger board, then what? How would you attach the deck? How does it help you to build this deck? I think it would help you to write the steps out.
What if you didn't use a ledger board? Would you want to offset the new joists, so that you can nail through the old rim joist or will joist hangers be enough to hold the weight? Where are the new joists being supported? If you don't offset the joists, will the nails from the new hangers run into existing nails from the old hangers or joists?
Or if you build the new deck a few feet away, how difficult would it be then join the two rim joists (join two whole deck frames)? What would be required? An extra rim joist board (of course), some lag bolts, jacks, maybe a come along, pinch bar, and some large hammers. Is this a feasible option? Is it easier? At that point you might look at the second rim joist, and call it a ledger board... although I don't know if it's right to call it that.
You could also consider removing the old rim joist, lapping/sistering the old and new joists, and cutting the old rim joist into blocks. This would allow you to set the new joists on the old support beam. I know the picture from your question is not your deck, but essentially, you need support under the new joists, and adding another support beam (probably) not far from the old one isn't exactly elegant.