JSFiddle - React, Tailwind, and code Playground

HTML

<div class='box a'></div>
<div class='box b'></div>

CSS

.box {
    float: left;
    margin: 0 5%;
    width: 40%
}

.a {
    height: 200px;
    background: blue
}

.b {
    background: red
}

JavaScript

$(function(){
    
    $('.b').height($('.a').height());

});