Would it be inappropriate and/or risky for me to bring a written offer from another company to the company I want to work for and ask them to match it?
I think that's two separate questions. But before we get to the questions, I think we should clarify that if you receive an offer from an employer you really like, but you feel the offer is low, it's always appropriate to attempt to negotiate something higher. Employers expect that.
Now, let's answer the easy question first:
Would it be risky?
A company that likes you enough that they're extending you an offer likely won't be offended to the extent that they withdraw their offer, so in that sense it's not risky. Also, if you've interviewed with that company, you've implicitly made it clear that you're in the middle of a job search, so that employer finding out that you're also interviewing (and receiving offers) elsewhere won't be a surprise, and likely won't be important information for them.
Would it be inappropriate?
If by "inappropriate" you mean "not effective" then I think the answer is yes, it would be inappropriate. As a hiring manager, I don't really care if you're getting better offers elsewhere. I'm evaluating you, as a candidate, based on what you're worth to me and what value you can bring my employer - not based on some other company's needs or criteria.
Further, a problem with basing your negotiation on another company's offer is that you're inviting this employer to justify their lower salary by comparing offers in other ways. Maybe this employer gives more PTO, or better 401k match, or allows work from home, or flexible hours, or a tech stack you actually want to work on, and so on.
I've watched this offer comparison game play out over and over. At my current employer, there's a competitor in town that (famously) pays high salaries. Some candidates I've extended offers to will point out that they have a higher paying offer from that company. The problem with them doing that as a negotiation tactic is that I can now point out that my employer offers more PTO, a better 401k match, better health insurance, more self-direction in terms of picking your tools and methods (and sometimes even projects), occasional work from home, an actual employee parking lot (instead of paying for your own parking), a fully stocked in-office kitchen, and a much more supportive and positive work environment (which is the polite way of saying: we won't put you on impossible projects and then bully you into working tons of overtime until you burn out, like that other company will).
It's to the point that when candidates mention that employer by name, it almost plays into my favor, since I can quickly focus on the reasons why my environment is better than that competitor's. I'm often happy to negotiate on salary in the offer process, but mentioning another offer doesn't play a significant factor. Even when they don't mention another company by name, it's pretty easy to take the conversation in this same direction of focusing on non-salary reasons why my employer is a great place to work. What I really want as a hiring manager is someone who will be happy and satisfied working at my company, so when offer comparisons happen, I will quickly shift to describing the big picture, rather than just getting worried about meeting some other company's salary. If a candidate is actually driven solely by getting the biggest salary, I will probably lose that candidate, but that may be the best thing for everyone involved, in the end.
Ultimately, if you've gotten an offer that you think is too low, and you want to negotiate a higher offer, you should base that negotiation on things that matter to the hiring manager:
- Be ready to show your experience and how it's relevant to their needs.
- Be ready to show that you're a team player and would fit well with their team
- And so on
A piece of paper saying you're worth $X per year to another company doesn't really help prove any of those points, so at best it's unimportant in terms of how I (as a hiring manager) decide on what salary I should offer you. Ideally, you've touched on these things in your interview, so you don't really need to rehash them, but it can't hurt to mention in summary during your request.