Mounting a window air conditioner on top of a sliding horizontal window
I did this, almost exactly as you have drawn (in my mothers home when I was a teenager). You will need to support the back end if you cannot support the bottom "lip" of the AC from sliding forward. In other words, the AC will have torquing-force.



The reason I used a shelf for my AC was because I couldn't support the top. But since you are putting the AC at the top of the window, then you need to support the bottom from pushing both down and inward (or set it on a shelf). You will need to build/cut a groove (not just a front lip).
A front lip is bad for two reasons: 1. A front-lip-only would mean that you would be able to lift the back of the AC up (when lift it, the bottom lip will slide out of the back of the window). 2. If you plan to unscrew the lip to remove the AC, it may slip forward suddenly (when the last screw comes out).

You need to consider taking the AC out of the window (and putting it in). So leave a little slop/space/room in the groove to lean the AC forward and lift it out. Normally it's not a problem, because you can lift most windows... but you will be at the top of the window. If the bottom lip is 1 inch wide, you will probably need to cut the groove 1 1/4" wide.

Also, I would add one or two more studs under the "ledge", so that it can't fall.