How to apply varnish of a different color on a varnished wood shed?
Depending upon the varnish that got used, or more specifically depending upon that varnish's UV resistance, it may darken (yellow) soon from exposure to the sun. If it was a spar varnish, it'll withstand UV much longer. Either way, count on revarnishing after several years (less if non-spar varnish, more if spar varnish).

Walnut-stain varnish over mahogany-stain varnish will in fact result in a blended color, although the darker walnut-stain varnish will probably strongly predominate. You might try getting a tiny half-pint can of the color you'd like and run a test on a piece of scrap wood - varnish the scrap with the mahogany, let it set up fully, then varnish over in a small area with the walnut. If you still don't like the color, try another half-pint of a different color like "ebony", for example, or a blend, until you do like the color. When you decide what you definitely like, write a note describing what worked well and staple it to the inside wall of the shed where you'll remember it when it's time to varnish again.