JSFiddle - React, Tailwind, and code Playground
HTML
<div id="a"></div>
CSS
div {
width: 100%;
height: 300px;
}
JavaScript
var first = "http://icondock.com/wp-content/themes/idock/images/featured-origami.png";
var second = "http://icondock.com/wp-content/themes/idock/images/featured-rocky.png";
var bgFormat = "url({1}) left top no-repeat, url({2}) bottom right no-repeat";
var cssBackground = bgFormat.replace("{1}", first).replace("{2}", second);
console.log(cssBackground);
$("#a").css("background", cssBackground);