If you own part of the company you don't just give that up without there being express wording in the charter (or whatever contract/paperwork you used to create the company). The problem you have is that right now, you own 40% of nothing so you're going to pay the lawyer you talk to (rather than have them work on contingency).
I should also note that this seems like a weird time to leave a startup ... did you really think you could cash out in just two years? Perhaps you haven't been "invested" in some time?
When we were starting the thing I was 19, kind of naive and inexperienced. Now that I'm 20 I've experienced a couple of other things along the road and it made me realize that I'm probably wasting my time here. Also, problems that seemed unlikely in the start arose so I believe this is the best decision right now
By pursuing this startup, what is the value of other opportunities you have to pass up. If you think the value of the startup is higher than those, then stick with the startup. However it sounds like you don't feel that way. If the other opportunities are a higher value, you should pursue those instead.
So far it sounds like you are mostly out time as you can get your cash back. If the business is not profitable and you don't have a good outlook on it. Then your time value so far is is lost, or sunk. Sunk costs, are sunk. You can't get them back, and people have lost a lot more trying to get them back.
As others have mentioned about, try to negotiate are prorated amount of your shares. If you can't get thank, don't keep wasting time here. Cut your losses and learn a lesson from it, then move on.
Realistically, you've likely answered your question regarding if it's worth it to fight it out.
Then again, if you've signed docs that say you own X shares, then Jim can't just take those away (as the parent poster mentioned).
Jim could issue a bunch of new stock (watering you down), or (if it's an LLC/s-corp with pass-through income) generate a bunch of phantom income to drown you in taxes, or create a new corp and sell the IP from oldCorp to newCorp for a pittance (bit of a quagmire there as you'd have good grounds to sue).
All of these present challenges, though.
Your best bet may be to determine a transition period where, at the end, he pays you for your shares and you walk away. Your chances of staying as an equity owner given the capitalization of the biz (~$1000, if I understand correctly, as his $12k was spent outside of the biz).
Of course, this should be in writing, signed, etc.
In the scope of your life, $1000 probably isn’t that much and it’s about the same as a college course. You’ve learned a lot. Those lessons are valuable. This hasn’t been a failure.
It would just feel bad to me to walk away for free from something I was working on that can be tomorrow sold for couple (tens of)thousands (the value doesn't really matter in this case) for free
So frankly there are many people who can start their own companies, but there’s a lot to learn in terms of actually working with people and choosing the right ones to build a company with, too.
The fact that their party can’t be fair regarding their share is already a huge-huge red flag. Many supposedly greedy people I know wouldn’t do that simply because they have respect for the capitalism (or in other words - they know perfectly well that their words are no longer enforceable).